Categories
Laravel Forge

GitHub Access Error During Laravel Forge Deployment

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

git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

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

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 *