我试图推动一些更改,但git push
挂起。当我运行git push
时,我看不到任何输出,也没有任何事情发生。 top
没有任何活动,也没有任何发生的迹象。git push在HTTP/1.1之后挂起(哑巴)https 100继续
我不控制git托管服务。我正在使用HTTPS网址。我相信托管服务使用哑HTTPS,而不是git的“智能HTTP”协议。在客户端,我使用Mac OS X,并且通过Homebrew安装了git 1.8.1.1(但使用包含在Xcode命令行工具中的git版本似乎没有什么区别)。注销并重新登录似乎没有帮助。我可以从一个不同的Linux机器上推送到这个托管服务/存储库。
下面是一些调试输出,显示git push
挂客户端发出后PROPFIND请求时,从服务器获取一个HTTP/1.1 100 Continue
响应,然后什么也没有发生:它只是卡住了。
我如何得到这个工作?有没有可以尝试的故障排除步骤?
$ GIT_CURL_VERBOSE=1 git push -v
Pushing to https://secure2.svnrepository.com/redacted/redacted/
* About to connect() to secure2.svnrepository.com port 443 (#0)
* Trying 67.228.18.88...
* Connected to secure2.svnrepository.com (67.228.18.88) port 443 (#0)
* Connected to secure2.svnrepository.com (67.228.18.88) port 443 (#0)
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
* subject: C=US; OU=Domain Control Validated; CN=secure2.svnrepository.com
* start date: 2012-01-09 16:16:59 GMT
* expire date: 2015-02-09 02:52:45 GMT
* subjectAltName: secure2.svnrepository.com matched
* issuer: O=AlphaSSL; CN=AlphaSSL CA - G2
* SSL certificate verify ok.
> GET /redacted/redacted/info/refs?service=git-receive-pack HTTP/1.1
User-Agent: git/1.8.1.1
Host: secure2.svnrepository.com
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache
< HTTP/1.1 401 Authorization Required
< Date: Wed, 23 Jan 2013 03:29:36 GMT
< Server: Apache/2.2.3 (Red Hat)
< WWW-Authenticate: Basic realm="redacted"
< Content-Length: 493
< Content-Type: text/html; charset=iso-8859-1
<
* Ignoring the response-body
* Connection #0 to host secure2.svnrepository.com left intact
* Issue another request to this URL: 'https://secure2.svnrepository.com/redacted/redacted/info/refs?service=git-receive-pack'
* Re-using existing connection! (#0) with host (nil)
* Connected to (nil) (67.228.18.88) port 443 (#0)
* Server auth using Basic with user 'redacted'
> GET /redacted/redacted/info/refs?service=git-receive-pack HTTP/1.1
Authorization: Basic redacted=
User-Agent: git/1.8.1.1
Host: secure2.svnrepository.com
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache
< HTTP/1.1 200 OK
< Date: Wed, 23 Jan 2013 03:29:36 GMT
< Server: Apache/2.2.3 (Red Hat)
< Last-Modified: Wed, 23 Jan 2013 03:00:40 GMT
< ETag: "143802e-3b-e6374600"
< Accept-Ranges: bytes
< Content-Length: 59
< Content-Type: text/plain; charset=UTF-8
<
* Connection #0 to host (nil) left intact
* Re-using existing connection! (#0) with host (nil)
* Connected to (nil) (67.228.18.88) port 443 (#0)
* Server auth using Basic with user 'redacted'
> GET /redacted/redacted/HEAD HTTP/1.1
Authorization: Basic redacted=
User-Agent: git/1.8.1.1
Host: secure2.svnrepository.com
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache
< HTTP/1.1 200 OK
< Date: Wed, 23 Jan 2013 03:29:36 GMT
< Server: Apache/2.2.3 (Red Hat)
< Last-Modified: Wed, 16 Jan 2013 21:05:31 GMT
< ETag: "d1802c-17-3d0d7cc0"
< Accept-Ranges: bytes
< Content-Length: 23
< Content-Type: text/plain; charset=UTF-8
<
* Connection #0 to host (nil) left intact
* About to connect() to secure2.svnrepository.com port 443 (#0)
* Trying 67.228.18.88...
* Connected to secure2.svnrepository.com (67.228.18.88) port 443 (#0)
* Connected to secure2.svnrepository.com (67.228.18.88) port 443 (#0)
* SSL connection using DHE-RSA-AES256-SHA
* Server certificate:
* subject: C=US; OU=Domain Control Validated; CN=secure2.svnrepository.com
* start date: 2012-01-09 16:16:59 GMT
* expire date: 2015-02-09 02:52:45 GMT
* subjectAltName: secure2.svnrepository.com matched
* issuer: O=AlphaSSL; CN=AlphaSSL CA - G2
* SSL certificate verify ok.
> PROPFIND /redacted/redacted/ HTTP/1.1
User-Agent: git/1.8.1.1
Host: secure2.svnrepository.com
Accept: */*
Depth: 0
Content-Type: text/xml
Content-Length: 181
Expect: 100-continue
< HTTP/1.1 100 Continue
* We are completely uploaded and fine
< HTTP/1.1 401 Authorization Required
< Date: Wed, 23 Jan 2013 03:29:37 GMT
< Server: Apache/2.2.3 (Red Hat)
< WWW-Authenticate: Basic realm="redacted"
< Content-Length: 493
< Content-Type: text/html; charset=iso-8859-1
* the ioctl callback returned 0
<
* Ignoring the response-body
* Connection #0 to host secure2.svnrepository.com left intact
* Issue another request to this URL: 'https://secure2.svnrepository.com/redacted/redacted/'
* Re-using existing connection! (#0) with host (nil)
* Connected to (nil) (67.228.18.88) port 443 (#0)
* Server auth using Basic with user 'redacted'
> PROPFIND /redacted/redacted/ HTTP/1.1
Authorization: Basic redacted=
User-Agent: git/1.8.1.1
Host: secure2.svnrepository.com
Accept: */*
Depth: 0
Content-Type: text/xml
Content-Length: 181
Expect: 100-continue
< HTTP/1.1 100 Continue
我没有我的Mac OS X机上strace
,我无法弄清楚如何使用dtruss
哪些系统调用它挂在因为dtruss
需要我是根目录,然后git push会以不同的方式工作。
更新:我已经在git 1.8.1.4和strace的Linux机器上重现了这一点。在后台运行strace显示类似于下面的东西它挂之前:
sendto(4, <redacted>..., 314, 0, NULL, 0) = 314
recvfrom(4, "\27\3\1\0000", 5, 0, NULL, NULL) = 5
recvfrom(4, "E\202\271\21\236p\200\346\374\3641\355\t\275\rLi\202T)\326\271l/\351\f\357\2769Jb\22"..., 48, 0, NULL, NULL) = 48
select(5, [4], [4], [], {0, 729000}) = 1 (out [4], left {0, 728997})
poll([{fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}, {fd=4, events=POLLOUT|POLLWRNORM}], 2, 0) = 1 ([{fd=4, revents=POLLOUT|POLLWRNORM}])
select(5, [4], [], [], {0, 729000}) = 0 (Timeout)
poll([{fd=4, events=POLLIN|POLLPRI|POLLRDNORM|POLLRDBAND}], 1, 0) = 0 (Timeout)
...last 2 lines repeat infinitely...
所以它似乎是挂期待从服务器接收的东西。
另外,我尝试过类似的跟踪与GIT_CURL_VERBOSE=1 git push -v
上运行git 1.7.4.4旧的Linux机器,它具有相同前缀开始,然后从那里继续进行。在破碎机与新的git:
$ grep '^> [A-Z]' git-1.8.1.1-trace.stderr
> GET /redacted/redacted/info/refs?service=git-receive-pack HTTP/1.1
> GET /redacted/redacted/info/refs?service=git-receive-pack HTTP/1.1
> GET /redacted/redacted/HEAD HTTP/1.1
> PROPFIND /redacted/redacted/ HTTP/1.1
> PROPFIND /redacted/redacted/ HTTP/1.1
在旧机器与旧混帐,在它的所有工作:
$ grep '^> [A-Z]' git-1.7.4.4-trace.stderr
> GET /g_wagner/c79-s13/info/refs?service=git-receive-pack HTTP/1.1
> GET /g_wagner/c79-s13/info/refs?service=git-receive-pack HTTP/1.1
> GET /g_wagner/c79-s13/HEAD HTTP/1.1
> PROPFIND /g_wagner/c79-s13/ HTTP/1.1
> PROPFIND /g_wagner/c79-s13/ HTTP/1.1
> HEAD /g_wagner/c79-s13/info/refs HTTP/1.1
> HEAD /g_wagner/c79-s13/objects/info/packs HTTP/1.1
> MKCOL /g_wagner/c79-s13/info/ HTTP/1.1
> LOCK /g_wagner/c79-s13/info/refs HTTP/1.1
> GET /g_wagner/c79-s13/objects/info/packs HTTP/1.1
...
> UNLOCK /g_wagner/c79-s13/info/refs HTTP/1.1
看着在两台机器上的全部跟踪,我不能查看有问题的PROPFIND请求(第二个PROPFIND)中发送的内容的差异:除User-Agent:
标题外,两个请求看起来都是相同的。
'
cjc343
谢谢,@ cjc343。有关如何进一步排除故障的任何提示?我正在使用'〜/ .netrc'进行身份验证,并且我确认我的'〜/ .netrc'与其他(Linux)机器上的值完全相同,我没有问题。此外,我能够从这台机器上成功拉出,这也需要认证证书 - 所以这一切都非常令人费解。 –
这的确很奇怪...不幸的是,我对http/s的git不是很熟悉,因为我一直使用ssh进行身份验证。除非意外地将拉取权限打开,否则无法推送并抛出大部分可能性,例如'.netrc'的权限过于开放或包含在远程中的用户名(我想这会显示如果是这种情况,则在上面),在窗外。如果你添加一个包含用户名的远程服务器,git会在推送时提示你输入密码(它应该)?希望别人有更好的想法是什么问题... – cjc343