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

Zenith2012's avatar

Unable to install github repo

Hi everyone, my situation is that i have a forge account currently with 2 severs (staging and production). The production server isn't in use yet as we haven't got that far so ignore it for now.

I have a couple of sites added to the staging server, one of which was pulled from a private github repo. THis worked fine, I added the deployment key into github when prompted by forge and then it pulled the repo without any issues.

The problem I now have is that i have a second site running on that server that is also a private repo and forge refuses to pull it down, the error given is:

ERROR: Repository not found.
fatal: Could not read from remote repository.

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

I have checked the repo name etc and its definitely correct. Futher on after this error Forge requests I make sure I have added the deployment key to my repository on github, I went to do this and it says the key is already in use.

From what I understand a deployment key can only be linked to a single repo.

I could get around the issue by making the repo public (which I think is why the other sites are working fine) but that's not really and option on this project.

How do I overcome this issue so I am able to pull multiple private repos to the same forge server.

Additionally, moving forward the staging server will pull repo A and B using the staging branch and the production server will pull the same repo A and B using the master branch. So, I could really do with help on how best to tackle this as it's my first time using forge and I'm fairly new to github.

Thanks in advance.

Edit: My friend who has colaborator rights to the repo's can pull them to his forge server fine.

0 likes
2 replies
_stefanzweifel's avatar
Level 18

Hi ?

As you've already learned, this sounds like an authentication error between Forge and Github. Do you see "Laravel Forge" in Githubs's list of Authorized OAuth Apps? If not you can reauthorize Github in Forge's settings page here.

Or it is connected with your server. When I provision a new server through Forge, I always receive an email from Github about a newly added SSH-key to my account with the name of the server. Did you receive that?

If not, can you deploy the Repo on your production server? Have you tried provisioning a new server and add the repo to the new server? If that would work, I would suggest destroying the old server and just use the new one.

Zenith2012's avatar

hi @_stefanzweifel thanks for the reply. Yes, this turned out to be an issue with authentication between forge and github. I changed the project to public and it worked fine, switched it back to private and it failed to deploy again which confirmed to me it's an authentication issue.

I tried several things without success, in the end because it's simply a staging server to test code I decided to re-provision it. This seems to have solved the issue for now and it's deploying code from private repos.

Cheers

Zenith

1 like

Please or to participate in this conversation.