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

GitHub login keeps popping up in SourceTree

Peter March 7, 2018

I recently tried pulling my GitHub repo with SourceTree and it kept failing. I was prompted to log into GitHub, so I filled in my username and password, but it still failed. I tried creating an SSH key and using that, still nothing. I googled whether my 2FA could've had something to do with it - got some guide on creating Personal Access Tokens, followed that, still nothing. I updated SourceTree to the newest version, repeated the steps, nothing. Checked the Options->Authentication, sure enough my GitHub account is there, but still nothing. Used the local Git, the embedded Git, still nothing. So at this point I'm running out of ideas to try out as multiple GitHub Login windows are popping up on my computer...

 

So, how do I connect SourceTree to GitHub, where I have 2FA enabled?

5 answers

5 votes
Bob Nies March 28, 2018

I'm sorry Atlassian, but you really screwed up your program. Going back to version 1.9.13. Yes I know you will tell me there are security issues, but at least it works.

bozmonster December 9, 2018

I agree, it's like source tree is being handed over to completely different dev teams every few months. Even the logo changes constantly.

Almost tempted to just make a Git client myself, because Source tree is so unstable that the only thing that works reliably is the log of the commit history - but very often I am forced to use the command line which makes me question why I'm using ST in the first place

4 votes
James McParlane March 13, 2018

I had the same problem. I found the thread you linked to useful, but I had to perform both options to get it to work.

This worked for me (Windows 10)

1) I installed Git from https://git-scm.com/download/win

2) In SourceTree in the Tools/Options/Git Config section, I clicked on "Use System Git"

3) I downloaded https://github.com/Microsoft/Git-Credential-Manager-for-Windows/releases/download/v1.14.0/gcmw-v1.14.0.zip 

4) I unzipped it and copied to the files to "C:\Users\%USERNAME%\AppData\Local\SourceTree-Settings\beta\git_local\mingw32\libexec\git-core"

5) I restarted SourceTree.

a) I found the reference to 'beta' confusing (I had also tried the latest SourceTree Beta to resolve this issue - to no avail) but went along with it.

b) I found it confusing that by setting git to be SYSTEM and not EMBEDDED that updating what appears to be the EMBEDDED git files worked. I tested going back to EMBEDDED and had the same issue as before. I will just go along with this counterintuitiveness. 

After these steps - Instead of popping up multiple Github Logins, I just got the one (yay!) and was then asked for 2FA, and everything worked. (even more yay!)

Every time I install Source Tree, the security configuration appears to get more and more painful. This is a terrible user experience still.

James McParlane March 13, 2018

NOTE: Use OAuth or you will be put through the 2FA process every authenticated operation you perform on a repository and rapidly create a lot of GitHub tokens :(

djwollam December 6, 2018

This solution worked for me. Thank you sir!

Csardas June 25, 2019

Thanks a lot, James! It works!

BTW your link provided at step 3) has expired. So I went to the latest GitHub page and download the zip; Here I just followed the manual installation instruction and run the install.cmd directly. 

Then I just followed the rest steps and YAYYYYYYYYYYYYYYYY!

2 votes
josh_yoder July 16, 2018

I got this fixed by just updating the Git credential manager on windows.  Seems to work great now.

Atlassian, if there's a dependency that needs to be updated, instead of just being silent, maybe notifying your user base would be more helpful.  I got the notification to update Git and Git LFS, but not the credential manager.

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

Hi! You'll need to update your version of Git so that the credential manager supports Github's recent security changes. You can read more about it on this Community  thread.

If after that it's still failing for you, let us know:

  1. Are you on Windows or Mac?
  2. Which Sourcetree and OS version are you using?
  3. Have you tried the command line?

Let us know how it goes!

Ana

Mujtaba Alam March 28, 2018

@Ana Retamal

I am having the same issue but it's for Mac and its connected to bitbucket and github.

Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 28, 2018

HI @Mujtaba Alam, have you updated already your version of Git? In which version are you?

fernandorr April 5, 2018

I have the last version of GIT (2.16.3) and Sourcetree.

I was using the embedded git and every time i tried to pull or push it was told that my password was wrong. So i had to reconnect my account (in both cases, push and pull. yes, 2 logins).

 

I read somewhere that if i used the system git it would solve the problem, and it solved, til yesterday.

Now i have to login every time i try to do anything and it's happening with or without the git system.

 

I really need a fix for this :(

0 votes
T K June 28, 2018

I had the exact same problem. Both SourceTree and Git (Git credential manager) upgraded to the latest version.

So i deleted all of my account credentials and opened up source tree in Administrator mode. I reentered my credentials once (using OAuth) and the problem was gone.

I'm guessing the credential manager could not update credentials if it was not ran as Administrator (?)

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events