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

相关推荐
程序员-Benothing1 小时前
Vim编辑器从入门到精通:模式、快捷键、配置、插件
linux·运维·服务器
‎ദ്ദിᵔ.˛.ᵔ₎2 小时前
linux 进程信号 (上)
linux·服务器
15Moonlight2 小时前
Linux网络(02):Socket 编程 UDP
linux·网络·udp
wuminyu3 小时前
ForkJoinPool窃取线程在扫描其他WorkQueue时的随机采样算法与Phase线程挂起唤醒机制解析
java·linux·c语言·jvm·c++
liulilittle3 小时前
Linux 下 select 测试函数
linux·服务器·网络·数据库·c++·select·c
DongQiShanRen3 小时前
玄龙(上):TICK 主循环——意识心跳怎么跳
linux·jvm·数据库·人工智能·数据挖掘·rust
小此方3 小时前
Linux网络(二十一):深入理解 TCP 异常处理:网线断开、Keepalive 保活机制与 Linux 内核传输层协议源码剖析
linux·网络·tcp/ip
pride.li3 小时前
Python 安装
linux·python·ubuntu
笔墨登场说说3 小时前
centos 8 使用 kafka_2.13-4.3.1.tgz 安装kafka
linux·kafka·centos