Suffering from the latest 403 error from GitHub on SourceTree?

Howie young
3 min readAug 17, 2021

This article may save your ass.

On August 13, 2021 (the Chinese Valentines Day, wtf), GitHub stopped supporting its password authentication for other applications and requires you to use a personal access token instead. So, many developers (yeah, you are not alone) faced the 403 error suddenly and were forced to do some manual settings to resolve the issue.

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 “…” : The requested URL returned error: 403

There are already some articles (like this and this) that give you guides which should resolve the problem for most cases. But, if you are a SourceTree lover, you will find none of it helps. Otherwise, you will not even be here.

It also took me several hours to figure out what went wrong and how to resolve it finally. So, lucky you!

*Note: The following info was tested and got with an env on Mac OS 10.14

Like many other articles tell you that you should create Personal Access Token on Github first.

source: https://stackoverflow.com/questions/68775869

Then you were also told to modify Keychain access like the following steps:

source: https://stackoverflow.com/questions/68775869

After trying the above steps, the issue was expected to be resolved. But once you open your SourceTree and try to fetch, pull, or push a commit, you will see the error is still right there.

The first issue I realized was that SourceTree didn’t use my GitHub personal access token as expected. So the first thing you should do is to delete other GitHub-related keys in your Keychain Access.

But then some of you might face another issue says about

So, you should also connect your GitHub account to SourceTree again.

Path: SourceTree > Menu > Preferences > Accounts > Add a new record or adit an existed record and choose to use SSH protocol to connect with GitHub
(Noted that in this step, you might face a redirection issue on windows if your SourceTree is not the latest version. So make sure to update it to the latest one!)

Once you successfully connect your GitHub account with SourceTree, you should get an SSH Key that you can copy to the clipboard.

Then, go to your GitHub personal setting again > find SSH and GPG keys > add a new SSH Key > paste what you got from the last step > confirm adding the SSH Key.

Finally, this should be the last step.

Go to your Keychain Access again, and now you should only see two records remain.

Then, click the key of GitHub Credentials and click on show password again, then you will see the password would be in the following format:

access_token=[Another SSH Key]&scope=&serviceProvider=GitHub

Now, just replace the [Another SSH Key] with what you created from GitHub with the first step at the very beginning of this article.

Now, you can stop crying.

It’s no problem to share this article anywhere if you find it helps.

And, you might know that the article is written by the founder of Tico, a software company focuses on secure and human-centered communication technology. Feel free to check our core product, Wondercall, which helps you add P2P-secured video connections into your app in seconds.

--

--