我已经“谷歌搜索”和“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)
或者 …