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

Why did github authentication suddenly stop working?

jean-gobert de Coster March 1, 2018

I've been comiting to my github repository on a sporadic schedule. Last time was about a month ago (Jan 31st)


Since then, nothing changed: my github password didn't change, I didn't even touch my git, nor sourcetree.


Today I have to commit a crucial bugfix, and when I try, I get the following error:


git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags origin master:master
fatal: HttpRequestException encountered.
Une erreur s'est produite lors de l'envoi de la demande.

remote: Invalid username or password.
fatal: Authentication failed for ''

Pushing to
Terminé avec des erreurs, voir ci-dessus


I tried the following:

- Refresh OAuth token
- Re-create a new personal access token (and switched to basic to use that token as password)
- Update embeded git version
- Tried to push with terminal
- git credential-manager clear

None of this worked. I had to restrain myself not to drive a fist through my computer's screen

Edit: I disabled two factor authentication in github, and I could then do a push. But I don't want to disable 2 factor in the long run.

2 answers

1 accepted

5 votes
Answer accepted
jean-gobert de Coster March 6, 2018

Just so other ppl who have this problem can easily solve it. Solution is to

1) install the latest git client (got mine here: )

2) set sourcetree to use system git (Go to "Tools > Options > Git " and click "Use System Git version")

miguelfor June 26, 2018

This worked for me, Thanks.

Sam Leatherdale August 7, 2018

I also had to install the latest version of the Git Credential Manager:

Like Hervé Le Meur likes this
Sunil Raman August 7, 2018

@Sam LeatherdaleThanks, this fixed the issue with command-line git bash on Windows and Bitbucket repositories, since even the latest stable Git download apparently ships with an older Git Credential Manager.

A N September 21, 2018

Can one of you tell me where to change the sourceTree.

I have downloaded the latest git client and the latest git credential manager.

I now have this error message:

fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
fatal: the remote end hung up unexpectedly
Pushing to
error: failed to push some refs to ''

Where is the "Tools" to do "Tools > Options > Git " and click "Use System Git version"
to set sourcetree to use system git?

I have looked at ma git bash and git gui windows and could not find how to set sourcetree to use system git.


Thank you for your help.

A N September 23, 2018

I found out I had a folder that was too large for git to handle in spite of increasing the buffer. I did not find a solution, I just removed the last commit and then commit everything but that big folder and it worked.

Francis Pierot January 14, 2022

This solved all my problems on two projects which failed to push. Thanks a lot.

1 vote
Mike Corsaro
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 1, 2018

Hello! Please see this comment. It was caused by Github deprecating TLS 1.1 support, which means that all older versions of git (versions released before Jan of this year...) won't be able to connect using the Git Credential Manager for Windows. Github decided not to inform us, or otherwise email any developers about this change, so we had no idea that it was going to happen. Sorry about that!

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events