关于ubuntu命令行连接github失败解决办法

如果发现ping github.com有问题

使用sudo gedit /ect/hosts 打开host文件

添加

140.82.114.4 github.com

发现使用git 克隆失败,出现
alia@ubuntu:~/文档/c++test$ git clone https://github.com/LearningInfiniTensor/learning-cxx.git
正克隆到 'learning-cxx'...
fatal: 无法访问 'https://github.com/LearningInfiniTensor/learning-cxx.git/':Failed to connect to github.com port 443 after 21036 ms: Couldn't connect to server

尝试使用 HTTPS 协议并禁用 SSL 验证:

git config --global http.sslVerify false

git clone https://github.com/LearningInfiniTensor/learning-cxx.git

相关推荐
Johny_Zhao3 小时前
OpenClaw安装部署教程
linux·人工智能·ai·云计算·系统运维·openclaw
砖厂小工14 小时前
用 GLM + OpenClaw 打造你的 AI PR Review Agent — 让龙虾帮你审代码
android·github
程序员鱼皮14 小时前
又一个新项目完结,我要出海了!
ai·github·开源项目
徐小夕15 小时前
pxcharts-vue:一款专为 Vue3 打造的开源多维表格解决方案
前端·vue.js·github
Moment16 小时前
想要长期陪伴你的助理?先从部署一个 OpenClaw 开始 😍😍😍
前端·后端·github
我叫黑大帅16 小时前
前端如何利用 GitHub Actions 自动构建并发布到 GitHub Pages?
前端·面试·github
HelloGitHub18 小时前
这个年轻的开源项目,想让每个人都能拥有自己的专业级 AI 智能体
开源·github·agent
刘发财1 天前
弃用html2pdf.js,这个html转pdf方案能力是它的几十倍
前端·javascript·github
sunny8651 天前
Claude Code 跨会话上下文恢复:从 8 次纠正到 0 次的工程实践
人工智能·开源·github