Git 拉取 HTTPS 和端口失败

  • 本文关键字:失败 拉取 HTTPS Git git
  • 更新时间 :
  • 英文 :


curl 可以访问 URL,但 "git pull" 不能。我想如果 url 中有用户+密码+端口,git 的 URL 处理有问题:

foo@workdevel123:~/src/foo$ git pull
error: The requested URL returned error: 503 while accessing https://user:password@example.com:40443/repos/djangotools/info/refs?service=git-upload-pack
fatal: HTTP request failed

curl 可以访问该页面:

foo@workdevel123:~/src/foo$ curl https://user:password@example.com:40443/repos/djangotools/info/refs?service=git-upload-pack
001d# service=git-upload-pack000000b525ceda9ef5cd8ef3542c3917c26229c4745d1342 HEADmulti_ack thin-pack side-band side-band-64k ofs-delta shallow no-progress include-tag multi_ack_detailed no-done agent=git/1.8.1.4
0040f22a42834c303630d0173ea0b232a9b486e92...

git 版本 1.8.1.4

使用 https、用户 + 密码和其他端口进行拉取的任何更改?

我找到了解决方案:

export GIT_CURL_VERBOSE=1; git pull

我的~/.gitconfig中有一个旧的代理配置。问题在键盘和椅子之间。

URL 中的端口号不是问题。

相关内容

最新更新