2

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、用户+密码和其他端口进行拉取的任何更改?

4

1 回答 1

0

我找到了解决方案:

export GIT_CURL_VERBOSE=1; git pull

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

URL 中的端口号不是问题。

于 2013-09-30T14:26:28.600 回答