"Failed to check login for user"when trying to loggin
Asked by tiavina30:

I have this error when I try to log in to a new account:  
![Capture.PNG](/t5/image/serverpage/image-id/118411iA0A27B1CF7A8A2FA/image-size/large?v=v2&px=999 "Capture.PNG")r ...


Answers:
author: sullycolivan
body: What nic said...then you take that token and enter that in as your password. I had the same issue as you and this worked for me. Sounding like loads of people having this issue right now. Token is generated at <https://github.com/settings/tokens>


author: Nic Brough -Adaptavist-
body: Yes, you'll need to create a personal access token for this account.

comments: author: Haeh5302
body: I'm also here for this issue but I'm struggling to apply the token to SourceTree.

If I attempt to update my account(s) within the Options there is no Authentication option for personal access token. (see below picture)

![SourceTreeAccountMenu.png](https://community.atlassian.com/t5/image/serverpage/image-id/118540iB4B39A7C8ED0935E/image-dimensions/197x174?v=v2 "SourceTreeAccountMenu.png")

If I attempt to directly clone a new repository from the URL the prompt login window also has no option for the personal access token (see below picture)

![GitHubLoginMenu.png](https://community.atlassian.com/t5/image/serverpage/image-id/118539iE5BD50EC92AD299D/image-dimensions/219x166?v=v2 "GitHubLoginMenu.png")

Some search results went as far as to imply that the password field is where the token value is placed. In neither scenario has this worked. I have the latest SourceTree version installed so I'm not sure what I'm missing?

Can you please walk through the process of taking a personal access token from GitHub and applying it within SourceTree?


author: Nic Brough -Adaptavist-
body: The reason I answered was that I ran into exactly the same a few days before.

As [@sullycolivan](/t5/user/viewprofilepage/user-id/1358167) answered, I entered the token as the password. I would add that you need to make sure the username you use is identical to the username you generate the token for - I seem to remember I failed the first time because of CaPiTaLs in my username.


author: Daniel Eads
body: Glad you all were able to come upon the answer. Given this has come up a few times, I just wanted to add the info that Github announced earlier this year they'd be [disabling passwords over basic auth](https://developer.github.com/changes/2020-02-14-deprecating-password-auth/) - and the time they'd make the hard switch (November 13, 2020) was last week.

There are actually two ways to solve it:

1. Generate a [Personal Access Token in Github](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token) and then paste that in place of your Github password in Sourcetree as [@Nic Brough -Adaptavist-](/t5/user/viewprofilepage/user-id/781454) and [@sullycolivan](/t5/user/viewprofilepage/user-id/1358167) mentioned
2. Switch from Basic authentication to **OAuth** in the **Auth type** dropdown in Sourcetree for your Github account. Then click the "Connect Account" button to authorize Sourcetree (this should open your browser and just be one click in Github if you're logged in on the web already)  
   ![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/119178i901BB57999EFD264/image-dimensions/513x232?v=1.0 "image.png")

Cheers,  
Daniel

comments: author: TK
body: [@Daniel Eads](/t5/user/viewprofilepage/user-id/1527694) This describes how to create a PAT for Github, but what if one is using Azure DevOps Repos?

For example, here is an error I'm getting when I take similar steps \>\>

![failure.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/306169iDFBBC7D19602A56B/image-size/large?v=v2&px=999 "failure.jpg")


Tags: atl-gruland