#5146 404 if repository name ends with ".git"
Opened 4 years ago by ponzipo. Modified 11 months ago

The UI allows the creation of new repositories with a name ending in ".git", but these repositories cannot be accessed, giving a 404 error. It's probably because the name interferes with the ".git" route that redirects to the same route without ".git".

How to reproduce: create a new repository called "<repository_name>.git"


Metadata Update from @wombelix:
- Issue assigned to wombelix

2 years ago

Behavior of other platforms if .git is part of the project/repo name

GitHub: remove all occurences of '.git' from the name and proceed with the creation, for example "test.git" just becomes automatically "test"

Gitlab: throws "The form contains the following errors"
          Project namespace path can contain only letters, digits, '_', '-' and '.'. Cannot start with '-', end in '.git' or end in '.atom'
          Path can contain only letters, digits, '_', '-' and '.'. Cannot start with '-', end in '.git' or end in '.atom'

Codeberg (Gitea): throws "The pattern '*.git' is not allowed in a repository name."

Metadata Update from @wombelix:
- Issue set to the milestone: 5.13
- Issue tagged with: bug

2 years ago

Responding with an error message seem the better approach, silently removing .git from the name and proceed with the creation doesn't make the user aware about the fact that this suffix isn't allowed.

Possible Solution:

Metadata Update from @wombelix:
- Issue set to the milestone: 6.0 (was: 5.13)

a year ago

Metadata Update from @wombelix:
- Assignee reset

a year ago

Metadata Update from @wombelix:
- Issue tagged with: easyfix

11 months ago

Log in to comment on this ticket.

Metadata