0

I have two Github accounts. One is for work and the other is for hobby programming. I created a repo for the hobby account and then inside ./git/config I set the credentials for the hobby profile. However, when I try to push changes to the code it complains:

remote: Permission to hobbyusername/blockchain.git denied to workusername.

When I run git --config list I can see the usernames and emails for both the work and hobby profiles. Any idea how to fix this?

Inside the repo when I run: git config user.email and git config user.name I correctly get the name and email for the hobby account and when print the same with --global I get the work account data.

CupOfGreenTea
  • 285
  • 1
  • 9
  • 2
    Does this answer your question? [Multiple GitHub accounts on the same computer?](https://stackoverflow.com/questions/3860112/multiple-github-accounts-on-the-same-computer) or [Can I specify multiple users for myself in .gitconfig?](https://stackoverflow.com/questions/4220416/can-i-specify-multiple-users-for-myself-in-gitconfig) and [How to switch between two git accounts on same device, in the Terminal (WSL2)?](https://stackoverflow.com/questions/69580617/how-to-switch-between-two-git-accounts-on-same-device-in-the-terminal-wsl2) – caramba May 25 '22 at 21:57

0 Answers0