What is a slug?

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 (.)

Note: 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

Note: 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

Note: 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.

 

Additional Help