Search code examples
gitgithub

remote: Permission to repository denied. URL returned error: 403


Might be a duplicate question, but none of the available solutions seems to be working. Could be that Github changed Support for password since 13 Aug, 2021.

I have tried the following:

  1. Checked the username and password.
  2. Created a Personal Access Token.
  3. Rechecked the origin URL in .git/config file.

The error message:

Username for 'https://github.com': gandharvsuri
Password for 'https://[email protected]': 
remote: Permission to gandharvsuri/gandharvsuri.github.io.git denied to gandharvsuri.
fatal: unable to access 'https://github.com/gandharvsuri/gandharvsuri.github.io.git/': The requested URL returned error: 403

Solution

  • This worked for me

    When creating your Personal Access Token, ✅Check some of the checkboxes e.g

    1. ✅repo
    2. ✅workflow
    3. ✅user
    4. ✅write:discussion
    5. ✅admin:enterprise
    6. ✅admin:gpg_key

    Well this worked for me Try this