我試圖推動一些更改,但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