git - How to Fix "Permission to x.git denied to user" Error when using multiple git account in Windows
- shinkhong97
- May 17
- 1 min read
remote: Permission to <user>/<error_repo>.git denied to <another_user>.
fatal: unable to access 'https://github.com/<user>/<error_repo>.git/': The requested URL returned error: 403
First, try this:
git config --global user.name "<your_git_user_name>"
git config --global user.email "<your_linked_email>"
or:
git config --global -e
List of git configuration files:
Global:
C:\Program Files\Git\etc\gitconfig or
C:\Program Files\Git\mingw64\etc\gitconfig
Repo:
%repo_path%\.git\config
System: to check it, install and use git credential manager or use Credential Manager in Windows
Edit the local git credentials and try to push again.
Comentários