Allowing public access to code

Still need help?

The Atlassian Community is here for you.

Ask the community

Starting from Bitbucket Data Center 8.18, public access is globally disabled by default. However, you can enable the feature at any time.

If public access support is an integral part of your workflow, we strongly recommend setting the relevant property to enable the feature prior to the upgrade.

To do this, in the bitbucket.properties file, set the property feature.public.access=true. Then, restart Bitbucket for the changes to take effect. If you run a Bitbucket cluster, a rolling restart is enough to pick up the configuration properties you set to enable the features.

You can open up public access for anonymous (unauthenticated) users to projects and repositories in Bitbucket Data Center. This allows you to:

  • Broadcast your repositories to a wider audience who generally don't have access to your source.
  • Utilize unauthenticated cloning of repositories when setting up continuous integration servers to work with Bitbucket.
  • Link from other systems, for example Jira applications or Confluence, to give users access to code without requiring authentication.
  • Create opensource projects or repositories.

Public access allows anonymous users to browse the files and commits for a specific repository or an entire project, and to clone repositories, without needing to log in, or have an account in Bitbucket.

In Bitbucket, you can:

  • configure a specific repository for public access.
  • configure a project to allow public access to all repositories in the project.
  • disable anonymous access by setting a global system property.

Making a repository publicly accessible

If you have admin level permissions for a specific repository, and your project admin hasn't restricted you from managing repository permissions, you can make it publicly available for anonymous access. Otherwise, you'll need to ask them to make your repository publicly accessible. Learn more about how project admins can restrict changes to repository settings

Go to the repository and click Settings, then Repository (under 'Permissions'). Check Enable (under 'Public Access') to allow users without a Bitbucket account to clone and browse the repository.

Making a project publicly accessible

If you have admin level permissions for a project, you can make the project publicly available for anonymous access.

This doesn't apply to private projects. 

Go to the project and choose Settings, then Permissions. Check Enable (under 'Public Access') to allow users without a Bitbucket account to clone and browse any repository in the project.

Viewing public repositories

Bitbucket displays a list of repositories for which anonymous access has been enabled.

Anonymous and logged-in users can choose Repositories > View all public repositories to see these.

Disabling public access globally

Bitbucket provides a system property that allows you to turn off public access for the whole instance.

To do this, set the feature.public.access property to false in the bitbucket.properties file in your Set the home directory.

Last modified on Feb 5, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.