git - 无法连接到 Github?

标签 git http networking github push

所以我尝试通过 Mac OSX 10.8.4 上的终端将一些更新推送到我在 github 上的存储库,但它不起作用。

我多次遇到同样的错误:

Lillys-MacBook-Air:Yuewei Lilly$ git push origin master error: Failed connect to github.com:443; Operation timed out while accessing https://github.com/lillybeans/Yuewei.git/info/refs?service=git-receive-pack fatal: HTTP request failed

一些背景:

  1. 在使用终端之前(我在加拿大时),我已经将许多项目推送到 github 上。
  2. 我目前在中国上海,会不会是 GFW?但是在北京的时候,我还是可以把项目推到github上。
  3. 当我 ping github.com 时:

Lillys-MacBook-Air:Yuewei Lilly$ ping github.com
PING github.com (192.30.252.131): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
ping: sendto: No route to host
Request timeout for icmp_seq 2
ping: sendto: Host is down
Request timeout for icmp_seq 3
ping: sendto: Host is down
Request timeout for icmp_seq 4
ping: sendto: Host is down
Request timeout for icmp_seq 5
ping: sendto: Host is down
Request timeout for icmp_seq 6
ping: sendto: Host is down
Request timeout for icmp_seq 7
^C
--- github.com ping statistics ---
9 packets transmitted, 0 packets received, 100.0% packet loss
Lillys-MacBook-Air:Yuewei Lilly$

  1. 我打开了 ShadowSocks(代理)。没有它,我无法通过浏览器访问 github.com,有了它,我可以。

  2. 同样,当我执行“git remote -v”时,我看到我的 pull 和推送远程存储库都正确列出。

提前致谢!

最佳答案

下次遇到这种情况时,请在 twitter handler 中查看 Github 状态.如果他们的 Twitter 句柄没有说他们的其中一台服务器出现故障或类似情况,则可能是某些防火墙阻止了您的访问。

关于git - 无法连接到 Github?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24028436/

相关文章:

git - 通过 Homebrew 安装 Git 不会将默认设置切换为 Homebrew

线程 "main"java.lang.StackOverflowError 中的 git-tf checkin 异常

git - 我可以在 GitHub 上指定一个特定的分支 pull-only(只读)吗?

javascript - 如何知道网站是否使用 cookie?

http - 如何使用 STM32 微 Controller 实现强制门户?

git - 如何更改 Git 中的分支基础?

java - 本地主机和暂存 url 的 Cors 过滤器

java - 我可以终止等待 TCP 连接进入的线程吗?

python - 使用 BPF 过滤器时 python 脚本的 CPU 使用率

ubuntu - 无法连接到我的虚拟机上托管的 cassandra