What is a repository slug?

Still need help?

The Atlassian Community is here for you.

Ask the community

A repository slug is a URL-friendly version of a repository name, automatically generated by Bitbucket for use in the URL. For example, if your repository name was "føøbar", in the URL it would become "foobar". Similarly, "foo bar" would become "foo-bar".

Differences between Bitbucket Cloud and Server repository slugs

Bitbucket Cloud repository slug

Bitbucket Server repository slug

Allows ASCII alphanumeric characters, underscores (_), en dashes (-), and periods (.) in repository slugs.

Allows ASCII alphanumeric characters, underscores (_), en dashes (-), and periods (.) in repository slugs.

Limited to 62 characters.

Allows greater than 62 characters.

Can only end with an en dash if the entire repository slug is made up of en dashes (-).

Allows a repository slug to end with an en dash (-).

Can start a repository slug with an underscore (_) or period (.).

A repository slug can also start with an en dash (-) if the entire repository slug is made up of en dashes.

Can only start with alphanumeric characters.

Does not allow consecutive en dashes (-) to be used in a repository slug unless the entire slug is made up of en dashes.

Bitbucket Cloud replaces any consecutive characters in a repository name that are not allowed in a repository slug with only one en dash, so a@b!-#c would be represented as a-b-c in the repository slug.

Allows the use of consecutive en dashes (-) in the same repository slug.

Bitbucket Server replaces each character in a repository name that is not allowed in a repository slug with en dashes, so a@b!-#c would be represented as a-b---c in the repository slug.

Must be unique within the same workspace

Bitbucket Cloud doesn't support duplicate repository slugs within the same workspace. Even if repository is assigned to a different project within the same workspace, the slug must be unique, this is due to the fact that each repository path is exclusively built with workspaceID/repo_slug at this time. 

Allows to have more than one repository with the same slug as long as the repository is assigned to a different projects.  
Last modified on Mar 1, 2023

Was this helpful?

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