1

I ran git clone remote_url using my work account and then ran git config user.name personal_user and git config user.email personal_email to change to my personal account.

However, when I do git push origin mybranch

    Pushing to git@github.com:whensbrunch/Surprise.git
    ERROR: Permission to repo denied to work_user.
    fatal: Could not read from remote repository.

I'm lost on how to debug this. Tried running grep in the .git repo to see if there were any unremoved mentions of work_user (there were in the logs). Also tried switching between ssh and https remote urls.

David Stevens
  • 835
  • 1
  • 6
  • 15
  • 1
    man, you changed your user and that error told me that it doesn't have permission. Give permission to your new user – Kenry Sanchez Jan 26 '18 at 21:02
  • @KenrySanchez the error is referencing the old user, before I changed it :/ – David Stevens Jan 26 '18 at 21:04
  • Possible duplicate of [Git - Permission denied (publickey)](https://stackoverflow.com/questions/2643502/git-permission-denied-publickey) – phd Jan 26 '18 at 21:59
  • https://stackoverflow.com/q/3860112/7976758 – phd Jan 26 '18 at 22:00
  • Have you configured you ssh key? Are you still using github.com/whensbrunch/Surprise or your own fork? And if you are not using your own fork, has whensbrunch giving to permissions? (if you use ssh you also have to let github know your public key) – LinFelix Jan 26 '18 at 22:46

0 Answers0