Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Why did github authentication suddenly stop working?


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

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")

This worked for me, Thanks.

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

Like Hervé Le Meur likes this

@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.

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.

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.

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

1 vote
Mike Corsaro Atlassian Team Mar 01, 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
Community showcase
Published in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

7,157 views 5 13
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you