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

Alzaabi98's avatar

How to secue my site repo in gitHub and give access to my developers ?

Hi team,

I am using github and forge/digital ocean to deploy my app but still I didn't get the full idea of laravel deployment using git and github, I have few questions and I hope someone can help to understand the process in details :

1- Now my repo is public.. is this something normal when I go to production or should I buy private ??

2- How can I secure my repo ??

3- How can I give access to make clones of my repo to only specific people ?? I mean developers.. I need detailed answer with command if possible

Thanks Abdulaziz

0 likes
6 replies
Sobak's avatar
Sobak
Best Answer
Level 2
  1. It only depends on whether you want your codebase to be publicly available. If you are fine with sharing your code, there is nothing wrong with deploying production website from the public repo.

  2. If by "secure" you mean restricting access to your source code, you will need private repository, that's right. However, Github is not the only option - you can also consider BitBucket or GitLab (probably GitLab.com in your case - they have private repositories for free).

  3. It is impossible with public repo, but with private one, user attempting to clone it will be asked for his credentials (login & password or SSH key) and if this specific person won't be allowed to perform a clone (you'll set this up on Github/Bitbucket/GitLab/whatever), his access will be denied.

Alzaabi98's avatar

Thanks for your reply.. this what I need.. i need to be secured.. How can I shift my repo from github to gitlab for example.. is it supported by forge ?

katifrantz's avatar

Yes. Gitlab is supported by Forge . 1 - Register for Gitlab. 2 - Create a new gitlab repository , and you will have an option to clone a Github repository into your new repository. Do that . 2 - Now go to Forge , spin up a new site/server , and choose gitlab as your repository.

That should do it !

willvincent's avatar

Then of course, update your local git config to point at the newly created gitlab repo, and once you've verified things are working on your end, and the deployment side, delete the currently public github repo. :)

Alzaabi98's avatar

Thank you all for the info.. I appreciated your feedback., apparently I have to select one answer.. but all of you give me great info

umefarooq's avatar

Hi if you really want private git repos and your team is small than use dropbox or owncloud(really really private) and git to share your git repo with team,

you can create branches of your git repo ask developer to work on branch later you can marge them in your main repo.

read this article to create git repo with dropbox- work same for owncloud

http://jetheis.com/blog/2013/02/17/using-dropbox-as-a-private-github/

owncloud self hosted cloud. https://owncloud.org/

never tried forge, hope this will work with forge also.

Please or to participate in this conversation.