I recently set up a new Windows 11 computer. I installed the latest version of Sourcetree. When I try to set up either a previously existing or a newly generated Personal Access Token for Github, it gets rejected. Here are my steps:
1) Open SourceTree (currently version 3.4.22).
2) Tools | Options | Authentication
3) Click Add
4) Set Hosting Service to Github.
5) Set Authentication to Personal Access Token
6) Click Refresh Personal Access Token
7) A Windows Security dialog opens including the instruction "Enter your PAT as the password for https://github.com"
8) Put my GitHub user name in the User Name textbox. (This username works for logging into GitHub.)
9) Paste the Personal Access Token into the Password textbox.
10) Click OK.
Observed: Login failed. Authentication failed for GitHub with username <my user name> - please check your account settings.
Expected: This to work.
Notes: I was finally able to clone a repository I need using Git Bash with the older PAT, and once I had a local version, I was able to open it in SourceTree, but I can't push or pull.
Any progress here? I'm coming back after a long hiatus of learning. I was never good at understanding how git works to begin with and now this is giving me even more of a headache. I have a PAT with - I think - right scope and permissions, but can't login or push any changes.
See my message from Feb. 18 below. That's how I solved this problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@TamarGranor I have already attempted deleting all Sourcetree folders in Local and Roaming to no avail. Doing so essentially returned Sourcetree to a first-run status and I still couldn't login to Github.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tracked it down to a mismatch in auth.json for the project I was working with.
I ended up regenerated the token and pasted it into auth.json.
Then I re-generated a new SSH key and added that to my Github account and it finally worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm having the same problem. I tried the suggestion that TamarGranor made without success.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was able to solve my own problem by deleting the Atlassian folders I found in my Users/<My user name>/AppData tree and then running SourceTree again and using the Personal Access Token to log in when prompted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Have the same problem here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am encountering the same issue, too. I checked this on two Windows computers, Win-11 and Win10, both are behaving this way.
When I inspect the records, the GitHub authentication type is always "Basic" but it should have been "PAT".
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.