在云服务器上,clone github时报Connection timed out&exit code: 128

文章目录

问题

在执行pip install安装依赖时,需要clone github代码,此时报了Connection timed out&exit code: 128错误,原因是访问超时了,此时需要使用代理

bash 复制代码
fatal: unable to access 'https://github.com/huggingface/peft/': Failed to connect to github.com port 443 after 130446 ms: Connection timed out
  error: subprocess-exited-with-error
  
  × git clone --filter=blob:none --quiet https://github.com/huggingface/peft /tmp/pip-req-build-6zluqgm4 did not run successfully.
  │ exit code: 128
  ╰─> See above for output.
  
  note: This error originates from a subprocess, and is likely not a problem with pip.

解决方案

使用https://ghproxy.com/代理,可以成功且快速地clone,如下图所示,在github地址前,加上,如:

bash 复制代码
https://ghproxy.com/https://github.com/huggingface/peft
相关推荐
hyf32663337 分钟前
泛程序:从零开始搭建稳定程序项目框架
运维·服务器·爬虫·百度·seo
为自己_带盐1 小时前
安敢越雷池一步?浅尝雷池WAF社区版
运维·web安全
NiceCloud喜云1 小时前
海外云服务器怎么选?适用场景、价格和避坑经验总结
运维·服务器
gwf2162 小时前
SSD读写速度深度解析:顺序读写vs随机读写、IOPS、延迟,你的硬盘性能到底怎么看?
git·嵌入式硬件·缓存·github·智能硬件
easy_coder2 小时前
Linux LVM 知识文档
linux·运维
小小的木头人3 小时前
Ubuntu 使用 udev + systemd + UUID 实现 USB 硬盘自动挂载
linux·运维·ubuntu
布鲁飞丝3 小时前
彩笔运维勇闯机器学习--cpu与qps的线性关系
运维·人工智能·机器学习
kaoa0004 小时前
Linux入门攻坚——84、网络虚拟化技术-1
linux·运维·服务器
RisunJan4 小时前
Linux命令-shutdown(安全关闭或重启系统)
linux·服务器·安全
2601_965798475 小时前
MTDb Movie & TV Database Script Setup, Caching, and SEO Guide
linux·服务器·数据库·php