Forums

Permission denied (publickey) when git clone

Hi, I just signed up for a free account, to try it out.

I am trying to git clone my github repo through the pythonanywhere console, and stuck with this error: Permission denied (publickey). fatal: The remote end hung up unexpectedly

I know this has to do with SSH key, how can I upload it then?

Hi there,

Probably the best thing to do is generate a new SSH key for your PythonAnywhere account. Open a Bash console, and type

ssh-keygen

Then follow the instructions. Once it has generated it, go to the Files view, browse to the .ssh folder, and then find the file called id_rsa.pub. this is your public key. click on it.

Then log into github, go to the account settings, add ssh key, and copy + paste the contents of your public key from pythonanywhere into github.

If you ever want to revoke access from PythonAnywhere, you can then delete that public key from github.

thanks for quick reply! solved.

It do not work for my new account. How can fix it?

What error are you getting? Have you run ssh-keygen in the new account and uploaded the public key to GitHub?

Thank You so much!!!

This worked for me. Thank you.

Thank you for confirming that!

Thanks, it worked!