【问题探讨】浏览器可以访问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.
相关推荐
网硕互联的小客服11 分钟前
如何排查服务器中已经存在的后门程序?
运维·服务器·github
小妖6661 小时前
git branch -a 还有一些已经删除了的分支
git
橘黄的猫2 小时前
深入浅出掌握 Git 子模块:项目管理利器
前端·github
独立开阀者_FwtCoder3 小时前
Vite Devtools 要发布了!期待
前端·面试·github
HelloGitHub4 小时前
从被喷“假开源”到登顶 GitHub 热榜,这个开源项目上演王者归来!
开源·github
wuk99814 小时前
基于MATLAB编制的锂离子电池伪二维模型
linux·windows·github
ai小鬼头15 小时前
AIStarter如何助力用户与创作者?Stable Diffusion一键管理教程!
后端·架构·github
天天扭码16 小时前
从图片到语音:我是如何用两大模型API打造沉浸式英语学习工具的
前端·人工智能·github
&Sinnt&18 小时前
Git 版本控制完全指南:从入门到精通
git·后端
独立开阀者_FwtCoder18 小时前
【Augment】 Augment技巧之 Rewrite Prompt(重写提示) 有神奇的魔法
前端·javascript·github