美文网首页
866.【git】解决:Failed to connect to

866.【git】解决:Failed to connect to

作者: 七镜 | 来源:发表于2023-11-27 06:48 被阅读0次

一、背景

  1. goland 开发工具;
  2. 以前配备有clash代理;
  3. git 以前配置过 http.proxy 和 https.proxy
  4. 执行 go get -u ;
  5. go get -u 后面跟的是带端口号的git地址,起源详见:408. 【go 语言】使用私有仓库的 go module
  6. 报错如下:
testgodriver/xxxx/common imports
        proxy.xxxxx.cn/share/go-sql-driver/xxxxx: module proxy.xxxxx.cn/share/go-sql-driver/xxxxx: git ls-remote -q origin in K:\v4_go_path\pkg\mod\cache\vcs\6101860f185291f54b13b576ac22ff584066fa685953dacffe2d9d13b73e9a2d: exit status 128:
        fatal: unable to access 'http://proxy.xxxxx.cn/share/go-sql-driver/xxxxxx.git/': Failed to connect to 127.0.0.1 port 7890: Connection refused

二、解决办法

取消git的代理:

git config --global --unset http.proxy
git config --global --unset https.proxy

相关文章

网友评论

      本文标题:866.【git】解决:Failed to connect to

      本文链接:https://www.haomeiwen.com/subject/lezawdtx.html