Jordan Smith
Jordan Smith

Reputation: 11

Multiple github accounts error

I keep getting an "ERROR: Permission to techjems17/beerholic-pokemon.git denied to JoSmith17. fatal: Could not read from remote repository" I have already created and added a SSH key to my github account, and have even been able to push and some code to it. After I had turned off my computer and then tried changing my code and pushing again I get this error. For some reason it is still attaching to my old github account and I do not know how to stop it and change it permanently to my new one. I have tried configuring the user name and email as well.

Upvotes: 0

Views: 283

Answers (1)

Jordan Smith
Jordan Smith

Reputation: 11

Okay after lots of research and trying multiple things. I only had to do the fallowing: 1. Be inside the repository. 2. type eval "$(ssh-add -s)" 3. type ssh-add -K ~/.ssh/id_rsa_(whatever else you added to SSH key) 4. git push This is what ended up working for me!

Upvotes: 1

Related Questions