Cannot clone nor push with http://username@bitbucket:7990/scm


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



While running Bitbucket Server connected to JIRA User Directory, it is not possible to clone nor push in the following combination:

git clone http://username@bitbucket:7990/scm/ACME/acmerepo.git


To simulate the request that Bitbucket Server is making to JIRA and see what JIRA is returning: 

  1. Create a file named "post-data" with the following contents:

    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. Run the following cURL command (from the directory where the file was created) with <application-name> and <application-password> replaced with the application name and application password that Bitbucket Server is using to connect to JIRA as a user directory:

    curl -v -X POST -H "Accept: application/xml" -H "Content-Type: application/xml" -u <application-name>:<application-password> --data @post-data
  3. If JIRA is integrated with IIS, the response should contain something like:

    Server: Microsoft-IIS/7.5
    X-Powered-By: ASP.NET


JIRA uses a 400 response code with a specific message in the body to indicate to Bitbucket Server that authentication for a particular user has failed. In this case the response body and content-type are being mangled by IIS behavior.

This causes Bitbucket Server to mis-parse the response from JIRA and fall over with a 500 error on the client.


  • Edit the web.config system.webServer section and set httpErrors existingResponse attribute to "PassThrough":

        <httpErrors existingResponse="PassThrough"></httpErrors>

    (info) For more information check Integrating JIRA with IIS.

Last modified on Mar 30, 2016


Powered by Confluence and Scroll Viewport.