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

相关推荐
想你依然心痛1 小时前
Linux用户空间与内核空间通信:netlink、ioctl、mmap 零拷贝与性能对比
linux·运维·服务器
GoGeekBaird1 小时前
我最近在写 BeeWeave,想把 Agent 用过的上下文留住
后端·github·ai编程
做个文艺程序员2 小时前
Linux第12篇:性能监控与瓶颈分析——CPU/内存/IO/网络全维度
linux·运维·网络
DogDaoDao2 小时前
LLM:用一条命令统一所有大语言模型的 CLI 工具
人工智能·语言模型·自然语言处理·llm·github
lpfasd1232 小时前
2026年第27周科技社区趋势周报
github
HAPPY酷2 小时前
【ROS2】 Conda 环境搭建(命令行版)
linux·运维·python·ubuntu·机器人·conda
阿彬学java3 小时前
Mac 本地项目推送至 GitHub 完整指南
github
hai3152475434 小时前
九章空间几何对照直译法:通用芯片 / 定制专用芯片 编译适配规则
linux·汇编·bash
ton_tom4 小时前
设备驱动程序编程-Linux2.6.10-kdb安装-32位
linux·运维·服务器
dong_junshuai4 小时前
每天一个开源项目#26 Caveman:8.2万星的 AI 口语压缩技能,输出减 75%
github