错误:"无法连接到github.com"

3

我是一个开始使用git的初学者。我已经在github上创建了我的账号,也创建了一个新的代码库。但是我无法使用终端推送或更新github上的更改。我正在运行以下命令:

mkdir ~/TestApplication
cd ~/TestApplication
git init
touch README
git add README
git commit -m 'first commit'
git remote add origin https://github.com/vinayptl/TestApplication.git
git push origin master

当我执行最后一个命令 git push origin master 时,它会冻结一段时间并出现以下错误:
error: Failed connect to github.com:443; Connection timed out while accessing 
https://github.com/vinayptl/TestingApplication.git/info/refs

fatal: HTTP request failed

我在Linux平台上工作。可能是什么问题呢?我看了一些SO的答案,但无法解决这个问题。


这个 仓库在Github上存在吗?你是否已经成功地从Github检出了一个仓库到这台机器上(也就是,你的SSH密钥设置正确)? - hafichuk
你可以尝试使用SSH URL来查看是否有效:git remote set-url origin git@github.com:username/TestApplication.git - Fred Foo
不行啊,是防火墙的问题吗? - vinay patel
当我尝试克隆那个仓库时,它要求输入用户名和密码,我只能假设这意味着“它有效”-因为我不知道这些细节,所以我无法继续... - Mats Petersson
ping -c1 github.com 失败了。我无法连接到 Github 服务器(207.97.227.239)。 - vinay patel
显示剩余2条评论
1个回答

2

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接