1

I am getting this error since there are two repositories from two different accounts, How to resolve this !!


  1. I cloned one project1 form Account-1 from github
  2. I am able to commit and pushed the changes to this Account-1
  3. I cloned one more project2 from a github account but it is different from account-2
  4. I am able to clone from Account-2
  5. But I am not able to push to account-2

I get the error as follows:

$ git push origin master
remote: Permission to myAccount/simple-demo.git denied to rahulTcs.
fatal: unable to access 'https://github.com/micheal/simple-demo.git/': The requested URL returned error: 403
Devrath
  • 42,072
  • 54
  • 195
  • 297

1 Answers1

1

This answer helped me solve the problem

If problem is coming on windows then remove the Credentials from the Windows history.

  • Go to Credential Manager
  • Go to Windows Credentials
  • Delete the entries under Generic Credentials
  • Try connecting again.This time , it should prompt you for the correct username and password.

enter image description here enter image description here

Remove credentials from Git

Devrath
  • 42,072
  • 54
  • 195
  • 297