Git Commands Return Fatal: Authentication Failed
When performing a Git operation to the Bitbucket Server instance over HTTP, the command fails with a
fatal: Authentication failed error.
$ git clone http://firstname.lastname@example.org/scm/project/repo.git Cloning into 'repo'... Password for 'http://email@example.com': fatal: Authentication failed
- Verify that the user can login to the web interface of Bitbucket Server.
This error can have multiple causes which are outlined below.
There is an Apache proxy server in front of Bitbucket Server that is removing the authorization header information as the request is passed to Bitbucket Server. This is caused by the
RequestHeader unset Authorization configuration being set.
The user has been locked out of Bitbucket Server because of too many incorrect login attempts.
Newer versions of Git for Windows (2.x.x+) can pick up on the
HTTP_PROXY environment variable and cause this issue.
RequestHeader unset Authorization configuration from Apache and restart the proxy server.
Check that the user can login to the web interface of Bitbucket Server and answer the CAPTCHA if prompted.
HTTP_PROXY environment variable.