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

相关推荐
草上爬26 分钟前
OpenWrt:使用ALSA实现边录边播
ubuntu·openwrt·record·alsa·play
apocelipes4 小时前
Linux c 运行时获取动态库所在路径
linux·c语言·linux编程
努力学习的小廉5 小时前
深入了解linux系统—— 进程池
linux·运维·服务器
秃头菜狗5 小时前
各个主要目录的功能 / Linux 常见指令
linux·运维·服务器
2301_793102495 小时前
Linux——MySql数据库
linux·数据库
Morpheon6 小时前
Cursor 1.0 版本 GitHub MCP 全面指南:从安装到工作流增强
ide·github·cursor·mcp
jiunian_cn7 小时前
【Linux】centos软件安装
linux·运维·centos
藥瓿亭7 小时前
K8S认证|CKS题库+答案| 6. 创建 Secret
运维·ubuntu·docker·云原生·容器·kubernetes·cks
程序员JerrySUN7 小时前
[特殊字符] 深入理解 Linux 内核进程管理:架构、核心函数与调度机制
java·linux·架构
孤寂大仙v7 小时前
【计算机网络】非阻塞IO——select实现多路转接
linux·计算机网络