【问题探讨】浏览器可以访问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.
相关推荐
止观止2 小时前
GitHub自动化利器:Probot框架实战指南
运维·自动化·github
掘我的金4 小时前
galgamex 容器化部署实战:从 Dockerfile、Compose 到 Prisma 初始化与首个账号
github
我的收藏手册4 小时前
性能监控shell脚本编写
前端·git·github
CoderJia程序员甲5 小时前
GitHub 热榜项目 - 日榜(2025-09-07)
ai·github·开源项目·github热榜
Yvonne爱编码6 小时前
简述ajax、node.js、webpack、git
前端·git·ajax·webpack·node.js·visual studio
掘我的金8 小时前
Text2Light 安装案例:从 GPU 可用到 OpenEXR 报错,再到顺利出图(Windows + Conda)
github
杨杨杨大侠8 小时前
第3章:实现基础事件总线
java·github·eventbus
杨杨杨大侠8 小时前
第4章:添加注解支持
java·github·eventbus
libokaifa8 小时前
C++ 基础学习
前端·架构·github
wallflower20208 小时前
从零到全流程 CI/CD:多技术栈项目自动化部署实战与优化指南
ci/cd·github