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

相关推荐
鹤落晴春20 分钟前
【Linux复习】管理SELinux安全性
linux·运维·服务器
yz_aiks30 分钟前
Linux Jar包配置Systemd自启动实战:从排查到配置全流程
linux·python·jar·自启动·systemd
徐小夕35 分钟前
万字长文!千万级文档 RAG 知识库系统落地实践
前端·算法·github
敲代码还房贷1 小时前
解决win7装不了vmware tools问题
ubuntu
bjzhang752 小时前
CentOS下安装MySQL详解
linux·mysql·centos
Jason_chen4 小时前
Linux 6.2 音频机制深度解析:AI驱动的低延迟音频与零信任音频安全架构
linux
用户279650435614 小时前
Narwhals:DataFrame 库的轻量兼容层
github
下午写HelloWorld4 小时前
Linux系统及Ubuntu常用指令
linux·ubuntu·操作系统
weixin_523185325 小时前
Collections.unmodifiableMap详解:真的不可修改吗?
java·linux·前端
右耳朵猫AI5 小时前
GitHub周趋势2026W22 | AI编程工具、知识图谱、自托管、AI代理、代码智能
人工智能·github·ai编程