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

slipperypenguine's avatar

Help with Deployment error

FIXED

Hi

I'm struggling to find the answer to why my deployment is failing. I have a digital ocean droplet and the connection test works. The code is in a public github repository. Deploy used to work fine but am returning to a project having not touched it for over a year. When I try to deploy I get the following:

"Fri Jun 23 08:09:46 BST 2017 Permission denied (publickey). fatal: Could not read from remote repository.

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

Any help gratefully received!

0 likes
6 replies
RayC's avatar

Sounds like you need to update the public key. Possibly it has changed or been removed from github for that project?

slipperypenguine's avatar

Hi Thanks for the responses

The public key was associated with my github account. I have tried removing it and adding it back as a deploy key against that project but same error. Added it again to the account under settings ssh and gpg keys. Still same error.

Does the name you give the key matter?

slipperypenguine's avatar

FIXED! I think the ssh key it was providing in the error was not the same as the one for the server. Thanks for the help

Mancy's avatar

Can you please let me know how you have fixed this issue, accidentally deleted the SSH key on GitHub.

ejdelmonico's avatar

@ASJessica If deployed with Forge, you will need to delete the repository associated with the site in the site details section. Then, just add the repository again and you should be fine as long as Forge and the server agree on the Forge keys.

Please or to participate in this conversation.