Reset Github User for Push

There are times when you need to have multiple different repository accounts for github and moving between them can be a bit of a problem. Here is my solution.


February 16, 2023

So I was working on a repository at home that I set up on another github acount, for another entity. In doing so, I clobbered my global github user and values and as such when I tried to git push none of the changes would go because it could not authenticate. Instead I got this:

rodney$ git push
remote: Permission to dyerlab/DLabWebsite.git denied to windbunny.
fatal: unable to access '': The requested URL returned error: 403

So, what you have to do is reconfigure the username,, and remote.origin.url to reset your user name for ssh/https pushing.

rodney$ git config dyerlab
rodney$ git config
rodney$ git config remote.origin.url

Then the next time you push it (go Salt-n-Pepper), it will ask for your authentication token again. Enter it and you are good.