Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Sourcetree ignores github token and throws 403 error

Владимир August 16, 2021

I have generated personal token on github and entered it in password field successfully, but when I try to fetch from my repo sourcetree throws me following error:

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks fetch --no-tags Room
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: unable to access 'https://github.com/daisoto/room.git/': The requested URL returned error: 403

I have tried deleting my accounts from sourcetree and logging in again, but I still receive this error.

 

However, if I use console there is no error. Is proves that there is some error or my mistake in using sourcetree account managament.

5 answers

1 accepted

21 votes
Answer accepted
RU-GHETES Mihaela
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 17, 2021

I had the same issue and solved it in this way:

Open sourcetree, in the right click icon Settings (Repository settings) ->Remotes -> Select Origin and Edit:

Set URL/Path in the following format:  https://<token>@<git_url>.git

Turca Ciprian
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 17, 2021

works for me too. Thank you!

Like # people like this
Владимир August 17, 2021

Thanks a lot for your solution!

 

Yet I have certain fear about this one, if someone gain access to your sourcetree client, they will easily find your token.

Like RU-GHETES Mihaela likes this
RU-GHETES Mihaela
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 18, 2021

Hi @Владимир ,

 

Even if it's not a nice one, that was the solution that got me out of trouble.

If you'll find another solution, please share it with us.

 

Thanks ,

Deleted user August 19, 2021

<3

Amy Nguyen
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 20, 2021

It woks on Mac. Thank you.

Abdullah Çınar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 21, 2021

This is actually a workaround of a bug. The bug is, even if you remove/change the old authentication method, the SourceTree will still try to use the old one. It is restored even if you uninstall and make a fresh install of the app.

To prevent this after removing the old git credentials, delete Atlassian folder from all the appdata folders. Then go to Tools->Settings->Authentication and add a new Basic Github authentication. Enter the Github username(not the e-mail) and use your token as the password. It should work after that.

Like # people like this
dwlorimer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 23, 2021

This workaround works!  Thank you SO much!!   Sourcetree needs to get this issue fixed ASAP.

Beena Cherian
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 29, 2021

Changing the url only works for me

jack.lin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 1, 2021

@Abdullah Çınar I delete passwd in AppData\Local\Atlassian\SourceTree and use token to login again. It works.

Like todagami likes this
todagami
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
November 3, 2021

@jack_lin this works for me!

Firemanchief52
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 3, 2021

I had the same issue, and found this link:

version control - When I try to pull or push in GitHub, I am getting an error message: "Please use a personal access token instead." - Stack Overflow

it require to modify (simply) the repository link.

it worked immediately.

authpala@workwave.com
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
December 14, 2021

Works me for Mac, Thanks!

Admin-Yukiko
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 24, 2022

Abdullah Çınar's solution has worked for me twice now. Once last year but I recently had to re-install Windows due to a system issue. I had forgotten how I had solved this issue before but thanks to a friend linking me to this thread, Abdullah Çınar helped me again.

Sergio Andrés Gómez Sandoval
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 17, 2023

I spent many days trying to find a workaround to this problem, I just deleted the Atlassian folder from C: - Users - MyUser - AppData and regenerated the authentication method in Sourcetree using Github and OAuth. 

Worked like a charm. 

Thank you Abdullah

2 votes
Karmandroid Singularity August 17, 2022

Delete your passwd file in \AppData\Local\Atlassian\SourceTree\

1 vote
howieyoung August 17, 2021

There are many different issues you might face.

We have tried to dig into each of them and resolve them all finally.

This article could be helpful for you: https://howieyoung.medium.com/suffering-from-the-latest-403-error-from-github-on-sourcetree-e04a844efd35

0 votes
alfit
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 27, 2023

 I delete passwd in AppData\Local\Atlassian\SourceTree and use token to login again. It works.

0 votes
Krit Busayarak
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 17, 2021

I use SSH-based authentication. It works.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events