代理导致的git错误

问题:

今天在clone时出现如下错误:

复制代码
fatal: unable to access 'https://github.com/NirDiamant/RAG_Techniques.git/': Failed to connect to 127.0.0.1 port 10089 after 2065 ms: Couldn't connect to server

真是让人感到奇怪!就在前天,我明明运行过git命令,一切都显得正常,怎么现在却出现了错误呢?根据系统给出的提示信息来看,问题似乎出在代理设置上。昨天升级了v2rayN,端口默认了。

解决:

直接修改git配置文件,该文件一般在C:\Users\gaobo\.gitconfig, 将端口修改的与v2rayN中的一致。

bash 复制代码
[credential "https://gitee.com"]
provider = generic
[http]
proxy = socks5://127.0.0.1:10808
proxy = http://127.0.0.1:10809
[https]
proxy = socks5://127.0.0.1:10808
proxy = https://127.0.0.1:10809
[filter "lfs"]
	clean = git-lfs clean -- %f
	smudge = git-lfs smudge -- %f
	process = git-lfs filter-process
	required = true

OK

相关推荐
自来也_5 小时前
Git配置代理
git
Jooolin20 小时前
【编程史】Git是如何诞生的?这可并非计划之中...
linux·git·ai编程
Lw老王要学习1 天前
VScode 使用 git 提交数据到指定库的完整指南
windows·git·vscode
去旅行、在路上1 天前
Git & Svn
git·svn
abcnull1 天前
github中main与master,master无法合并到main
git·github
养意1 天前
git提交代码和解决冲突修复bug
git·bug
码农黛兮_462 天前
Git 常用命令大全
git
一弓虽2 天前
git 学习
git·学习
疯狂的沙粒2 天前
如何通过git命令查看项目连接的仓库地址?
大数据·git·elasticsearch
qq_254617772 天前
Gerrit+repo管理git仓库,如果本地有新分支不能执行repo sync来同步远程所有修改,会报错
git