Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

SamuelNitsche's avatar

Unable to clone github repo

I have trouble installing a new site on a forge server. When I try to install a new application via a github repository, I get the following error.

Cloning into 'default'...
Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

The ssh key for the forge user is added correctly to github. What am I doing wrong? Thanks for your help!

0 likes
2 replies
Nash's avatar

The ssh key for the forge user is added correctly to github.

The error message implies otherwise.

SSH into your server and view the public key with the following command:

cat ~/.ssh/id_rsa.pub

Add the contents of the public key file to your Github account (the whole thing, starting with ssh-rsa... including [email protected]):

https://github.com/settings/keys

Also make sure that your github user actually has permission to access the repo in question.

SamuelNitsche's avatar

I think my forge server was broken? I double checked everything but id didn't work. I now have reinstalled the whole server and deleted all ssh keys on github created by forge. Now it works. Thank you anyway!

Please or to participate in this conversation.