Yes, just the same way you do it for a public one. I currently have 2 sites connected via github private repos.
forge for private repositories
is there any way I can connect forge to a private repository?
@chrisgeary92 for some reason for me when i press deploy now on a private repo it doesn't work
I don't know if this is still an issue, but a week ago I had the same issues. I use Bitbucket (cuz free =) ) private repos and when I push and watch the site (should be in real time) nothing happens.
Most of my projects on forge are in Bitbucket (free private git repo). They all work great. Is there an error you are getting? have you tried hitting deploy again and then looking at the log?
I am still facing the 'That repository name is invalid.' error! I am using a github private repo with forge and digital ocean. Other posts on the forum says i need to enable third party access on my git repo, but i don't see any such thing. Appreciate any help!
@mstnorris "you need to add your Forge SSH key to your GitHub account." Where can I find my Forge SSH key?
@rap-2-h
- SSH into your Forge Server
- `cd ~/.ssh (change directory to where your SSH keys are)
-
cat id_rsa | pbcopy(this will get the contents of your SSH key and copy it to your clipboard) - Go to the Settings page of your GitHub account, and find SSH keys.
- Add your new SSH key, and name it something like "Forge" so you can identify it later.
I hope that helps.
For those who stumbled upon this via Google... Step 3 should be cat id_rsa.pub. You should paste your public key, not your private key.
Hi Everyone,
I just faced the same issue and thought to share my solution here.
My scenario was i had a private repo on GitHub, Server Digital Ocean and using Forge for management.
I have accomplished private repo by doing the following steps.
-
In Forge when adding a new site, select the custom option, which will give you SSH .
-
Copy that SSH , go to your GitHub account settings -> Repo -> Settings and then Deploy Keys.
-
Add your copies SSH here, give it a name and set permissions to read and write.
-
Now go to repo and click on Clone and Download Option and select "USE SSH" instead of "USE HTTPS". It will give string copy it
-
Now time to go back to your Forge again from where you copied the custom SSH. Now Select Custom and paste the copied string in the Repository input field and hit enter.
-
That's it and enjoy
Seems the Github direct link only works for public repos, must use Custom with private repos on Github (and ignore Forge's built in Github option)
Using the cusom repository option made it work for me. Almost how @adnan.shabbir describes it. I only did not configured my keys as deploy keys in github. They where allready configured in my github account.
HI Everyone,
I just started the Laracast Forge tutorial series this week and hit the same problem. Already tried to solve it but the issue persists. I tried to follow the steps suggested by Adnan but hit another problem here: "Now go to repo and click on Clone and Download Option and select "USE SSH" instead of "USE HTTPS". It will give string copy it" as i could not find the " Clone and Download Option" on Github. Maybe as this post is a few years old the layout at Github as changed? Any suggestions ????
Please or to participate in this conversation.