【发布时间】:2021-06-08 08:47:41
【问题描述】:
我已经在我的笔记本电脑上安装了 git-bash,并试图将我的项目推送到我的 GitHub 帐户上,但它显示了这个:
$ git push -u origin main fatal: unable to access 'https://github.com/user_name/repo_name.git/':
Could not resolve host: github.com
我已多次尝试该命令并检查其他内容。有时我发现,这个命令让 bash 屏幕卡住了,什么也没做。 -_-
我已经试过这个命令来确保遥控器是正确的:
$ git remote -v
然后得到这个:
origin https://github.com/user_name/repo_name.git (fetch)
origin https://github.com/user_name/repo_name.git (push)
我在 git config 中检查了我的用户名和电子邮件:
$ git config user.email
$ git config --global user.password
发现所有这些东西我都试过了。
【问题讨论】:
-
您的电脑无法解析主机
github.com。 -
这似乎是网络问题