[RESOLVED SSH] Github permission denied. The requested URL returned error 403

Опубликовано: 15 Июль 2026
на канале: CodeEasy
746
11

Resolve using Credential Manager    • [RESOLVED] Github permission denied. The r...  

In this video I have demonstrated how we can resolve the github remote: permission to username/git-repo.git denied to username.
fatal: unable to access 'https://github.com/username/git-repo.... The requested URL returned error: 403

Commands used in the video
-----------------------------------
1. First Create SSH key for both accounts
ssh-keygen -t rsa -b 4096 -C "[email protected]"

2. ssh-add C:\Users\username\.ssh\githubUsername
Note : Make sure that the file path is directing to correct location. If confused simply go to that folder where it is saved and copy the pat

3. Open GitHub accounts
a. Settings - SSH and GPG Keys
b. New SSH Key
c. Paste the key (Make sure it is authentication)

4. Come back to terminal and type nano ~/.ssh/config
5. Host github-githubUsername1
HostName github.com
User git
IdentityFile C:\Users\username\.ssh\fileName1

Host github-githubUsername2
HostName github.com
User git
IdentityFile C:\Users\username\.ssh\fileName2

6. git remote set-url origin git@github-githubUsername:username/repo.git

#github #codeprep #permissiondenied #githublearning #sshkey #authentication #sshauthentication #codeeasy #permission #programmingforbeginners