关于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

相关推荐
黑白园4 分钟前
个人台式机VMware 15及Ubuntu 16.04.5卸载以及VMware 16.2.3及Ubuntu 24.04.4安装
linux·ubuntu
腾科IT教育8 小时前
Oracle认证怎么选?2026年OCP/OCM报考指南
linux·运维·华为认证·hcie·开闭原则·datacom
chaors12 小时前
DeepResearchSystem 0x03:HITL
llm·github·ai编程
longerxin202012 小时前
nano编辑器插入、编辑完整操作教程(Linux日志/配置专用)
linux·运维·编辑器
OpenTiny社区13 小时前
Loop Engineering:让 AI Agent 自己跑起来的工程方法
前端·github
木心术113 小时前
GitHub Actions自动化运维实战:从CI/CD到全链路DevOps
运维·自动化·github
炸膛坦客14 小时前
Git 和 GitHub:(七)将本地新建仓库与 GitHub 远程仓库关联起来(SSH)
git·ssh·github
fthux14 小时前
GitZip Pro:给GitHub仓库“瘦身”的魔法剪刀手
人工智能·chrome·ai·语言模型·开源·github·open source
u13013015 小时前
GitHub 热榜项目:周榜(2026-07-26)
github
听风34716 小时前
Arch Linux 软件安装完全指南
linux·运维·archlinux·pacman