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

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

一,确认是否能ping通

bash 复制代码
$ 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://...
bash 复制代码
$ 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://...
bash 复制代码
$ 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
bash 复制代码
$ git config --global http.proxy http://127.0.0.1:1080
bash 复制代码
$ git config --global https.proxy https://127.0.0.1:1080
bash 复制代码
$ git config --global --unset http.proxy
bash 复制代码
$ git config --global --unset https.proxy
bash 复制代码
$ 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
bash 复制代码
$ git config --global http.sslVerify "false"
bash 复制代码
$ git config --global https.sslVerify "false"
bash 复制代码
$ 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.
相关推荐
OsDepK1 小时前
mimo code安装教程
git·电脑·ai编程
狂炫冰美式2 小时前
凌晨睡不着,我给台风巴威写了个追踪网站
前端·后端·github
Maynor9963 小时前
GitHub 外链 / 自荐入口清单
github
oscar9994 小时前
3.4 Nginx 负载均衡——动态再平衡的反人性纪律
nginx·github·负载均衡·财富源代码
杨超越luckly4 小时前
Agent 应用指南:基于 OurAirports 的中国机场设施数据可视化
python·html·github·可视化·机场设施
Maynor在掘金4 小时前
憋了两个月,Gemini 3.5 Pro 终于要来了!前端代码一次生成,传闻 7 月 17 日亮相。
github
NexTunnel4 小时前
公司老项目还在 SVN,远程维护怎么做更稳?
git·svn·gitlab·远程工作·nextunnel
满天星830357716 小时前
【Git】原理及使用(七) (多人协作 [下])
git
DogDaoDao1 天前
ShellGPT:当大语言模型遇见命令行——深度解析一个 CLI AI 生产力工具的设计与实现
人工智能·语言模型·自然语言处理·github·大语言模型·shellgpt·终端命令行
郡杰1 天前
Git基础与开发平台搭建
git·后端