I want to disable forking or change every repo to have no forking and ensure that new projects do not have fork permissions.
How can I do that?
Hello Gagan and welcome to the Community!
There is an option available to adjust forking permissions per repo. There is currently not an option to globally disable forking so the following will need to be done on each repo. Here are the steps to adjust forking permissions:
Forking permissions allow you to specify whether and how a user can fork your repository. Because public repositories allow public forks, you must make your repository private to restrict forking.
- From the repository, click Settings in the sidebar.
- From the Repository details page, if you don't see the Forking option, select This is a private repository.
- From the Forking dropdown, select one of the following options:
- Allow forks—Users can fork the repository and those forks can be public.
- Allow only private forks—Users can fork the repository and those forks will be private.
- No forks—Users can't fork the repository.
- Click Save repository details.
Source documentation: Set repository privacy and forking options
I hope this proves helpful and you’re able to adjust your forking permissions without issue.
Regards,
Stephen Sifers
Hi Stephen,
Thanks for your reply. Is there any way to stop for new repos?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Gagan,
Repo permissions may be controlled by the groups/teams you already have created when a new repo is created. However, fork and public/private permissions are not inherited and controlled on a per-repo/creation basis. Meaning, you will have to set this manually each time a new repo is created. More about inherited permissions may be found at Grant repository access to users and groups
I hope this is helpful in clarifying fork permissions for repos.
Regards,
Stephen Sifers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.