0

So, I switched a github repository from 1 account to another, and on the new account, removed the first account's permissions, but when trying to push, I get this error: remote: Permission to (my project).git denied to first (account). I already set the new account in git using git config --global user.name and git config --global user.email but I still get the error

torek
  • 448,244
  • 59
  • 642
  • 775
  • git doesnot care about user.name or user.email, in the second github account, do you have the SSH key added? – Paul Bradbury May 02 '22 at 11:27
  • Small correction to @PaulBradbury's comment: Github does not care about these. – j6t May 02 '22 at 11:29
  • Correction to both of you: GitHub surely cares about `user.email` — it uses email to relate commits to GitHub accounts. But `user.name`/`user.email` are not pull/push credentials. Credentials for protocol `https://` are PATs, credentials for `ssh://` are SSH keypairs. – phd May 02 '22 at 13:46

0 Answers0