【问题探讨】浏览器可以访问github项目,但是git clone失败

记录一次git clone github上的项目,浏览器可以访问,但是git clone失败的处理过程

一,确认是否能ping通
$ ping github.com
Pinging github.com [20.205.243.166] with 32 bytes of data:
Request timed out.
如果不能ping通,先处理ping问题,详见如下链接

Github无法ping通的解决策略

二,clone项目(第4步才成功)
1,git clone https://…
$ git clone https://github.com/tom-wong168/knowledge-system.git
Cloning into 'knowledge-system'...
fatal: unable to connect to github.com:
github.com[0: 140.82.113.3]: errno=Unknown error
2,改https为git,git clone git://…
$ git clone git://github.com/tom-wong168/knowledge-system.git
Cloning into 'knowledge-system'...
fatal: unable to access 'https://github.com/tom-wong168/knowledge-system.git/': Failed to connect to github.com port 443 after 21069 ms: Couldn't connect to server
3,重置 http.proxy
$ git config --global http.proxy http://127.0.0.1:1080
$ git config --global https.proxy https://127.0.0.1:1080
$ git config --global --unset http.proxy
$ git config --global --unset https.proxy
$ git clone git://github.com/tom-wong168/knowledge-system.git
Cloning into 'knowledge-system'...
fatal: unable to access 'https://github.com/tom-wong168/knowledge-system.git/': Failed to connect to github.com port 443 after 21071 ms: Couldn't connect to server
4,设置 http.sslVerify 为 false
$ git config --global http.sslVerify "false"
$ git config --global https.sslVerify "false"
$ git clone git://github.com/tom-wong168/knowledge-system.git
Cloning into 'knowledge-system'...
remote: Enumerating objects: 69, done.
remote: Counting objects: 100% (69/69), done.
remote: Compressing objects: 100% (50/50), done.
remote: Total 69 (delta 14), reused 57 (delta 8), pack-reused 0
Receiving objects: 100% (69/69), 4.52 MiB | 42.00 KiB/s, done.
Resolving deltas: 100% (14/14), done.
  • 7
    点赞
  • 21
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

tom_wong666

码字不易,分享有功,期待赞赏!

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值