Reputation: 227
Trying to push a file and getting this error:
remote: Permission to AndrewPreciado/CS6432016.git denied to Adrew64.
fatal: unable to access 'https://github.com/AndrewPreciado/CS6432016.git/':
The requested URL returned error: 403
Adrew64 refers to my an old github account username I used back in the day, but I want to use this new account with AndrewPreciado.
Anything I can do? Thanks
Upvotes: 1
Views: 6983
Reputation: 20221
Alternative way to delete the stored credetials for old user is
git credential-osxkeychain erase
then on the next line type these
host=github.com
protocol=https
<press return or enter key>
then try pushing the code again it will ask you for credentials username & password and then this should work
Upvotes: 1
Reputation: 190
Your computer has saved local credentials
Follow the following steps on windows: open control panel -> user accounts -> manage your credentials -> window credentials -> delete git account credentials
It will work fine then.
Upvotes: 3