Permission denied (public key)

I get this error when I tried to create new git account and wanted to push my project into my personal Github repo. The issue is I already use another account professionally. I generated ssh public key and added it in my personal Github account in settings. And when I try to clone a file from the repo in the personal Github account I get this error "ssh-add -l -E sha256
Could not open a connection to your authentication agent.", "Permission denied (public key). It will be very helpful If I get any help to solve this.

:wave: Welcome!

So - first, GitHub is not really made for using multiple individual accounts. Our standard behaviours and features typically do not take this use case into consideration. Especially when using SSH keys, we’ve seen people manage to lose access to their accounts because of trying to juggle multiple accounts.

:warning: So proceed with caution here. We can’t always rescue you if things go wrong. :warning:

If you want to use both accounts from your one machine, and use SSH, you will need to create two different configurations in your ~/.ssh/config file, each with its own SSH key.

There’s a walkthrough in a Medium post that should cover it: