在云服务器上,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
相关推荐
开开心心就好26 分钟前
发票合并打印工具,多页布局设置实时预览
linux·运维·服务器·windows·pdf·harmonyos·1024程序员节
CoderJia程序员甲30 分钟前
GitHub 热榜项目 - 日榜(2026-02-06)
人工智能·ai·大模型·github·ai教程
火车叼位1 小时前
脚本伪装:让 Python 与 Node.js 像原生 Shell 命令一样运行
运维·javascript·python
css趣多多1 小时前
add组件增删改的表单处理
java·服务器·前端
Sheep Shaun1 小时前
揭开Linux的隐藏约定:你的第一个文件描述符为什么是3?
linux·服务器·ubuntu·文件系统·缓冲区
野犬寒鸦1 小时前
从零起步学习并发编程 || 第七章:ThreadLocal深层解析及常见问题解决方案
java·服务器·开发语言·jvm·后端·学习
迎仔1 小时前
06-存储设备运维进阶:算力中心的存储管家
运维
?re?ta?rd?ed?1 小时前
linux中的调度策略
linux·运维·服务器
全栈工程师修炼指南1 小时前
Nginx | stream content 阶段:TCP 协议四层反向代理浅析与实践
运维·网络·网络协议·tcp/ip·nginx
hweiyu002 小时前
Linux 命令:tr
linux·运维·服务器