Push Proxy fails with Bitbucket Mirror

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

  

プラットフォームについて: Cloud、Server、および Data Center - この記事はすべてのプラットフォームに等しく適用されます。

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Fisheye および Crucible は除く

  

要約

When attempting to push to the mirror URL, it fails with "fatal: Authentication failed"

環境

Git client 1.8.3.1

診断

No further information other than the following is in the atlassian-bitbucket.log from the mirror:


 DEBUG [https-jsse-nio-8443-exec-5] @2VQ601x1405x85x0 <IP Address> "GET <REPO URL> HTTP/1.1" c.a.b.i.m.m.s.h.WriteRequestInterceptorFilter Redirecting SCM write request to upstream URL <BITBUCKET REPO URL>



From Git client debug logging you'll see something similar to

< HTTP/1.1 302
< Cache-Control: private
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< X-AREQUESTID: @2VQ601x1405x85x0
< Location: <BITBUCKET FULL REPO URL>
< Content-Length: 0
< Date: Tue, 11 May 2021 20:25:47 GMT
...

HTTP/1.1 401
< Cache-Control: private
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< X-AREQUESTID: *1RP649Hx925x3639x0
< x-xss-protection: 1; mode=block
< x-frame-options: SAMEORIGIN
< x-content-type-options: nosniff
< WWW-Authenticate: Basic realm="Atlassian Bitbucket"
< Transfer-Encoding: chunked
< Date: <DATE> GMT
<
* Ignoring the response-body
* Connection #3 to host <BITBUCKET URL> left intact
* Issue another request to this URL: <BITBUCKET REPO URL>
* Couldn't find host <BITBUCKET BASE URL> in the .netrc file; using defaults
* Found bundle for host : <BITBUCKET BASE URL> 
* Re-using existing connection! (#3) with host <BITBUCKET BASE URL>
* Connected to <BITBUCKET BASE URL> (IP address) port <PORT> (#3)
> GET <repo name>/info/refs?service=git-receive-pack HTTP/1.1
User-Agent: git/1.8.3.1
Host: <BITBUCKET URL>
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache

< HTTP/1.1 401
< Cache-Control: private
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< X-AREQUESTID: *1BTPOE1x925x1781x0
< x-xss-protection: 1; mode=block
< x-frame-options: SAMEORIGIN
< x-content-type-options: nosniff
* Authentication problem. Ignoring this.
< WWW-Authenticate: Basic realm="Atlassian Bitbucket"
< Transfer-Encoding: chunked
< Date: <DATE> GMT
<
* Connection #3 to host <BITBUCKET URL> left intact
fatal: Authentication failed for <BITBUCKET URL>

注意:

The X-AREQUESTID under the HTTP/1.1 302 (Found response) should show up in the mirror log with the initial line of "SCM Write request"


原因

There is an issue with older versions of Git not properly handling a URL redirect like this.

ソリューション

Upgrade Git on the client to a later version. Currently, 2.9.3 is the earliest tested resolution to resolve the issue



最終更新日 2021 年 5 月 14 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.