Git 配置代理
1.git提交或克隆报错fatal: unable to access 'https://github.com/xxx/': Failed to connect to github.com port 443 after 21087 ms: Couldn't connect to server2.当前python第三方包版本太高,如何降低版本3.清除Linux终端屏幕
4.Git 配置代理
5.23年最新版pycharm找不到conda可执行文件解决办法6.backbone、head、neck等深度学习中的术语解释7.CommandNotFoundError: Your shell has not been properly configured to use ‘conda activate‘.8.出现了HTTPSConnectionPool(host=‘huggingface.co‘, port=443)错误的解决方法9.2 种从 Linux 终端下载文件的方法使用 git clone 下载 Github 等网站的仓库时,可能会遇到类似 "Recv failure: Connection was reset" 或 "Failed to connect to http://github.com port 443 after 21114 ms: Couldn't connect to server" 的报错。即使打开了全局代理,也会报错。此时,需要为 Git 单独配置代理,可以使用以下命令:
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890
配置完成后,可以使用以下命令查看并修改 Git 的配置:
git config --global --edit
此时 Git 的默认编辑器会打开 ~/.gitconfig 文件,其中包括了代理的配置:
[http]
proxy = http://127.0.0.1:7890
[https]
proxy = http://127.0.0.1:7890
这样就完成了配置,可以 clone 一个仓库来测试,比如:
git clone https://github.com/github/gitignore.git
如果仍然报错,可以检查代理端口是否配置正确,并尝试用以下命令设置关闭 SSL 证书验证:
git config --global http.sslVerify false
关于 Git 配置的更多信息,请阅读 Git - git-config Documentation
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用AI程序员写了一个飞机大战
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· .NET10 - 预览版1新功能体验(一)