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

GitHub login keeps popping up in SourceTree

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

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.

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

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.

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 :(

This solution worked for me. Thank you sir!

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!

1 vote
Ana Retamal Atlassian Team Mar 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

@Ana Retamal

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

Ana Retamal Atlassian Team Mar 28, 2018

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

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 :(

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.

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
Community showcase
Published in Sourcetree

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

4,917 views 0 12
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