Laravel Forge

GitHub Access Error During Laravel Forge Deployment

If you encounter the following error during a deployment in Laravel Forge:

<span class="hljs-attribute"></span>: Permission denied (publickey).
<span class="hljs-attribute">fatal</span>: Could not read from remote repository.

<span class="livecodeserver">Please make sure you have <span class="hljs-keyword">the</span> correct access rights
<span class="hljs-keyword">and</span> <span class="hljs-keyword">the</span> repository exists.</span>

Follow these steps to resolve the issue:

  1. Access Laravel Forge Server Settings:
    • Navigate to the specific server's page on Laravel Forge.
  2. Copy Server's Public Key:
    • Click on "Settings" on the server's page.
    • Locate and copy the "Server's Public Key".
  3. Add the Key to GitHub:
    • Visit GitHub SSH Keys Settings.
    • Under the "Authentication keys" section, click to add a new SSH key.
    • Paste the key you copied from Laravel Forge.
  4. Retry Deployment:
    • Return to Laravel Forge and initiate the deployment process again.

Leave a Reply

Your email address will not be published. Required fields are marked *