Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,362,857
Community Members
 
Community Events
168
Community Groups

Why did github authentication suddenly stop working?

Edited

Hi,
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 'https://github.com/jeango/TwinCATBrowser/'

Pushing to https://github.com/jeango/TwinCATBrowser
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: https://git-scm.com/download/win )

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:

https://github.com/Microsoft/Git-Credential-Manager-for-Windows

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 https://myLogin@bitbucket.org/myLogin/myPorject.git
error: failed to push some refs to 'https://myLogin@bitbucket.org/myLogin/myProject.git'

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
TAGS

Atlassian Community Events