On the GitHub Enterprise system, is there a way to make "private" the default mode for repositories?

We're setup to allow both our normal internal users as well as certain vendors to have access to our instance. The site as a whole is "private" (so we're not leaking private code to the world), but we don't want the vendors to see all the code in the system, just their own. So, we setup our repositories as private and add permission groups as appropriate.

At least in theory. In practice, new repositories default to public (any authenticated user can see them), and more often than not, the developer setting up the new repository forgets to go and make it private. I'd like to make private the default so that there's no way to forget that important step.

up vote 5 down vote accepted

GitHub recently added support to make repositories private by default

Setting

  • The OP asks specifically for enterprise. Where did you read it is discontinued? – osowskit Nov 6 at 14:00

I asked GitHub this same question and was told it's not possible. They said they're aware that many customers have asked for this feature, so it's something their developers are looking into.

This was their response as to how to fix:

While it won't prevent the initial creation of a public repository, one option is to use the Repository Creation event to trigger a webhook. You could then have a lightweight system that checked the visibility of the repository and send a warning to the creator if it's set to public.

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.