I am trying to upload a project to github so I ran the command
$ git push origin master
but it gives me
remmote: Permission to [repo name] denied to [old github account I used on this
laptop]
fatal: unable to access repository
I am trying to upload a project to github so I ran the command
$ git push origin master
but it gives me
remmote: Permission to [repo name] denied to [old github account I used on this
laptop]
fatal: unable to access repository
You need first to check the remote URL used:
git remote -v
If it starts with https://, you might have a cache with the wrong credentials in it
git config credential.helper
For instance, see "sign out in the Git Bash console in Windows":
git credential-manager reject https://github.com
On Mac, for osxkeychain
, see "Updating credentials from the OSX Keychain"
git credential-osxkeychain erase https://github.com
Then the next push would trigger a popup asking you to enter the username/password.
If it starts with git@github.com:...
, you might use the default id_rsa private key for the old account.