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?
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"
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.
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:
Let us know how it goes!
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 (?)
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...
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