Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

HTTP Clone Fails Error: fatal: Authentication failed for

millwardt April 28, 2020

Users are able to clone using SSH without any issues, but attempts to clone using HTTP result in a 'Error: fatal: Authentication failed'

I'm not sure if a previous colleague may have been attempting to set up HTTPS but failed, and has corrupted a configuration file - however I'm not sure where to start

1 answer

1 accepted

0 votes
Answer accepted
Evan Slaughter
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 5, 2020

Hey @millwardt,

Where I usually start for tracking down these types of issues is to see if there's something perhaps on a reverse proxy between you and Bitbucket that could be causing some kind of interference - as well as checking the debug/trace logs from the git client performing the clone.

For the proxy piece, I recommend going through our steps on bypassing the reverse proxy and testing a clone that way. And then for checking the debug logs on both Bitbucket/the git client you could do something akin to the following:

Enabling Debug logging & Generating a Support Zip in Bitbucket

  1. Go to Gear Icon > Support > Logging and Profiling Check Enable debug logging and click the Save button;
  2. Reproduce the issue and take note of the time it was reproduced;
  3. Go to Gear Icon > Support > Support Tools > Create support zip tab uncheck Limit File Sizes and click Create button;
  4. Go to Gear Icon > Support > Logging and Profiling uncheck Enable debug logging and click the Save button;

Enabling Git trace logging

  1. On the server with the cloning git instance, set the following environment variables:
    •  export GIT_TRACE_PACKET=1
    •  export GIT_TRACE=1
    •  export GIT_CURL_VERBOSE=1
  2. Re-attempt the clone operation, and then save the resulting output to a text file.

With those two resources, the server logs and the git client logs, you should be able to analyze their contents to hopefully discern the reason for these users failing authentication. If I had to guess, though, there's possibly some kind of global/cached git credentials on the git client for these users that are automatically authenticating with the incorrect set of credentials. You should be able to see these auth failures in the audit logs on your instance though.

Hope this helps!

Thanks,

Evan Slaughter 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events