
Git pushes with a wrong user and permission fails
Reading time: 4 min
Content List
It sometimes happen that you are trying to push to a remote git repo but it says the permission is denied on a user that you are not even actually trying to authenticate with, here are two solutions
First of all, check your local and global configs on git in your projects terminal, see if they are set as what you expect by:
For local configs
For global configs
If the local is not the user your trying to push with, then change them with:
If they are alright, or changes did no good, then you should check you key chain credentials
On windows, head to
- control panel
- user accounts
- manage your credentials
- windows credentials
Look for a row saying git:https://github.com or any other gitlab for example if that’s what you’re looking to fix
After finding it, remote the row through the dropdown at the very right side of the row
Now head back to your terminal and push again, you will be asked to sign in to your GitHub, complete the sign in and you should be good to go.
Was this page helpful?
What was the most helpful point of this page for you?
Thanks for your cooperation!
Leave a Reply