Unable to push to Git after switching user


#1

After switching user on Git (as I had mixed up my personal and work users) I can push from the CLI on my work Mac, but cannot push from Atom;

Unable to push
no such identity: /Users/<USER>/.ssh/<OLD_USER>: No such file or directory
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

#2

Just to clarify, for the same project on your computer you can push from the command line but in Atom you can’t?

And does the file mentioned in the error message exist?

Can you clarify what you mean here?


#3

I replaced the ssh key I was using with my work account so the <OLD_USER> key no longer exists