小编Hey*_*Boo的帖子

推送到远程存储库时出现“无法连接到 github.com 端口 443:连接超时”

我已经“谷歌搜索”和“stackoverflowed”了很多次,但还没有找到解决我的问题的方法。

我在 Ubuntu 上,第一次尝试git。

我做了:

sudo apt-get install git
Run Code Online (Sandbox Code Playgroud)

并在网站上创建了一个帐户(并验证了电子邮件,一切正常)。然后我

git config --global user.name "<my_name_here>"
Run Code Online (Sandbox Code Playgroud)

git config --global user.email "<my_email_here>"
Run Code Online (Sandbox Code Playgroud)

然后我访问该网站并创建了一个名为的公共存储库gittest(我没有使用自述文件进行初始化,也没有添加许可证或 .gitignore)。然后我

mkdir gittest
Run Code Online (Sandbox Code Playgroud)

在我的桌面上和

cd /Desktop/gittest
Run Code Online (Sandbox Code Playgroud)

然后:

echo "# gittest" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/<my_username>/gittest.git
Run Code Online (Sandbox Code Playgroud)

最后

git push -u origin master
Run Code Online (Sandbox Code Playgroud)

这就是悲剧:通过在写入后单击 Enter,git push -u origin master它什么也不做,并且在(许多)秒后返回一条错误消息:

致命:无法访问 ' https://github.com/ /gittest.git/':无法连接到 github.com 端口 443:连接超时

  • 我该如何解决?请帮忙

编辑

如果我

echo "$http_proxy"
Run Code Online (Sandbox Code Playgroud)

或者 …

linux git ubuntu github

7
推荐指数
1
解决办法
4万
查看次数

标签 统计

git ×1

github ×1

linux ×1

ubuntu ×1