代理导致的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

相关推荐
Unity粉末状在校生7 小时前
Git解决fatal: Could not read from remote repository.的问题
git
少年攻城狮7 小时前
Obsidian系列---【如何使用obsidian同步到git?】
git
do better myself10 小时前
网站源码如何部署和加入GIT仓库的
git
爱学英语的程序员12 小时前
Git 提交 LF will be replaced by CRLF the next time Git touches it 报错
git
qq_3391911413 小时前
服务器git pull每次都要输入密码,linux 设置git登录,linux设置git只输入一次账户密码
git
一颗小行星!19 小时前
快速理解 Git submodule
git
A-Jie-Y21 小时前
Git基础-核心概念与常用命令
git
夜珀1 天前
Git基础修炼手册:在AtomGit上玩转版本控制
git
golang学习记1 天前
Zed IDE官宣新招:Git Graph 正式支持!
ide·git
要记得喝水1 天前
适用于 Git Bash 的脚本,批量提交和推送多个仓库的修改
git·elasticsearch·bash