Member-only story

Github permission denied (error 403 )when pushing commits using Sourcetree on mac

L. Wang
Dec 20, 2021

--

I met the following error message when I tried to push commits through Sourcetree to Github over https:

remote: Permission to github-username/project-name.git denied to github-username.
fatal: unable to access 'https://github.com/github-username/project-name.git/': The requested URL returned error: 403

I resolved this problem by creating a personal access token to replace the password.

On Github, Settings/Developer settings/Personal access tokens/Generate new token:

Generate new token

Copy the newly generated personal access token.

Paste the personal access token to the password of the GitHub account information on Sourcetree. Auth Type: Basic; Protocol: https.

--

--

L. Wang
L. Wang

Written by L. Wang

0 Followers

Data scientist, statistician

No responses yet