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

相关推荐
a小胡哦11 分钟前
Windows、Mac、Linux,到底该怎么选?
linux·windows·macos·操作系统
_extraordinary_20 分钟前
Linux权限(一)
android·linux·excel
易安杰28 分钟前
ElasticSearch+Kibana通过Docker部署到Linux服务器中
linux·elasticsearch·搜索引擎·全文检索·中文分词
笑虾34 分钟前
Docker 自制镜像:Ubuntu 安装 samba+Webmin
ubuntu·docker·samba
人生!?1 小时前
给小米/红米手机root(工具基本为官方工具)——KernelSU篇
android·linux·智能手机
Anna_Tong2 小时前
阿里云如何协助解决操作系统兼容性问题
linux·服务器·ubuntu·阿里云·centos·云计算·系统迁移
不良人天码星2 小时前
Linux的基础指令和环境部署,项目部署实战(下)
linux·运维·服务器
油泼辣子多加4 小时前
2025年02月21日Github流行趋势
github
致奋斗的我们4 小时前
HAProxy介绍与编译安装
linux·汇编·数据库·mysql·青少年编程·haproxy·openeurler
waves浪游4 小时前
Linux基本指令(上)
linux·运维·服务器