Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to disable fork on private repo on github

Tags:

It was easy on bitbucket. if I dont want my repo to be forked. I can disable it. Only people I have invite can work on repo as long as they have permission on repo.

But where is that functionality in github. I have enterprise repo and I want invite people work on it. but dont want them to fork it.

I might have missed something, google search didn't bring anything useful. Can anybody point me in right direction please ?

Thanks in advance for your time.

like image 360
Alix Avatar asked Dec 10 '14 15:12

Alix


2 Answers

GitHub doesn't have such a feature as Bitbucket has, but still, you can't make fork from a private repository public. You'll see this message:

Private forks can't be made public.

It gives you a "fool protection" when somebody want's to publish your private repo. Of course, if somebody really want's to do this, they always can push all the code to some new repo as @Chris stated above.

like image 190
Dmitriy Avatar answered Sep 28 '22 21:09

Dmitriy


I'm not aware of any way to do this in GitHub, and frankly I don't see any value in Bitbucket letting you "disable" forking, either.

Bitbucket may let you disable the fork button, but anybody who can clone your repository can "fork" it by simply pushing it up to a different remote:

git clone [email protected]:alix/some-repo.git
git remote set-url --push origin [email protected]:chris/some-repo.git
git push origin master
like image 27
Chris Avatar answered Sep 28 '22 19:09

Chris