I'm unable to link my GitHub account to SourceTree. Here's what I'm doing:
1) I open SourceTree, go to Tools, and then Options. I click the Authentication tab, and then click 'Add'. A popup appears called 'Edit Hosting Account'. For 'Hosting Service' it says 'Bitbucket'. For Host URL, it says 'https://bitbucket.org/, For Preferred Protocol it says HTTPS.
2) I change 'Hosting Service' to GitHub. The Host URL automatically changes to https://github.com. I change 'Preferred Protocol' to SSH.
3) I then go down to Credentials. In the 'Authentication' field, it says 'OAuth'. I am not allowed to click inside the Username field. I change 'Authentication' from 'OAuth' to Basic. I'm now allowed to click inside the Username field.
4) I type my GitHub username. I'm not allowed to click 'OK'. The only thing I can seem to click is 'Refresh Password'. I click that.
5) A second popup box appears. It's entitled "SourceTree Password Request". My username is prepopulated. It says "Enter your password for https://github.com/." I enter the password. I click 'OK'.
6) The second popup disappears, but I now have an error message on the first popup. It says:
"Authentication failed. Failed to check login for user [myUsername]. Requires authentication."
I'm unable to progress beyond this point. I know for an absolute 100% cast-iron certainty that my GitHub username and password are definitely correct.
Please could someone give me step by step instructions for how to link my GitHub account to SourceTree? Please bear in mind that I've never used this software before so please make your explanations as simple as possible. Don't assume I know anything, even the things I probably should know.
Thanks in advance. Any help you could provide would be gratefully appreciated.
P.S. - I'm running Windows 10 and the most recent version of SourceTree.
you need to create a personal access token for your github , Settings->developer Settings->personal access token-> generate new token and when adding your github account to source tree, you need to use this personal token as your password instead of your regular password for github. hope this helps
Thanks. This worked for me.
I could login in with OAuth as the alternative approach, but organizational access was not available with OAuth for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I had the exact same issue as you. What I did was the same as you from 1. to 4., but in 4. after I input my username, I've switched the authentication back to OAuth.
The username stayed there and when I clicked on Refresh OAuth token, I got transferred to github site confirming authentication of atlassian with the options to specify permissions. I didn't change anything there, just confirmed and after that I could finally connect to github and push my code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Happened to me today. My solution is to not use Sourcetree rather than trying a work around.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had the same terrible experience. Inside of Sourcetree I kept getting prompted for my password in a couple of different contexts, entering what I know was the correct password, and getting the message that login failed. I found that once I created a local repository I was able to open and access it fine in Sourcetree; I just couldn't create a local repository with ST.
I downloaded GitHub Desktop, created (cloned) a local repository with that, then opened it with Sourcetree. Then everything was fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"Beginning August 13, 2021, we will no longer accept account passwords when authenticating Git operations on GitHub.com."
https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What is the process here to get Sourcetree working then? I;ve read that article and am unclear as to how to proceed in clone github repos in sourcetree
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same problem, I'm on Windows 10 running the current version. Has anyone figured this out? OAuth is not an option for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the exact same problem and I'm looking for answers.
By the way, I do have a workaround but this authentication is irritating anyway.
Ok, here's the workaround:
Create a repository on GitHub account then clone it with Sourcetree via HTTPS.
Sourcetree is going to ask you for GitHub credentials. This time, for some weird reason, it's going to remember your credentials. By the way, make sure to have Git installed as I'm using Git Credential Manager.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I am following the same steps and I am having the exact same issue. I am also logged in using the same credentials on GitHub but sourcetree is having this issue.
error
We couldn't connect to GitHub with your (username) credentials. Check your username and try the password again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.