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

相关推荐
optimistic_chen6 分钟前
【Redis系列】主从复制
linux·数据库·redis·缓存·中间件·命令行·主从复制
zhyf1197 分钟前
零刻AI Max395(Ubuntu 24.04)AMD 显卡监控工具(amdgpu_top)部署手册
linux·运维·ubuntu
wdfk_prog39 分钟前
[Linux]学习笔记系列 -- 内存管理与访问
linux·笔记·学习
go_bai39 分钟前
Linux-网络基础
linux·开发语言·网络·笔记·学习方法·笔记总结
糖~醋排骨1 小时前
FW防火墙的配置
linux·服务器·网络
ZFB00011 小时前
【麒麟桌面系统】V10-SP1 2503 系统知识——设置面板无法打开
linux·运维·kylin
2301_780943841 小时前
linux 对文件打补丁(Patch)
linux·运维·服务器
敬往事一杯酒哈2 小时前
Ubuntu 20.04 安装Anacada
linux·运维·ubuntu
Lam㊣2 小时前
服务器端口转发的方法
linux·服务器