Removing the username string in the Repository URL #13752

Closed
opened 2025-11-02 10:52:10 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @wuda2525 on GitHub (Nov 25, 2024).

Feature Description

Hey Team,

Apologies if this has been discussed or documented.

I was wondering if it is possible to remove the username in the Repository URL, especially for an Admin user
For example, I have an admin with a username of "bob", when I create a Repository called "Test", Gitea will provide the following URL

http://localhost:3000/bob/Test.git

Is it possible to get rid of the name "bob" in the path and just have it as
http://localhost:3000/Test.git

Or maybe the example below (where r is a short form for repository)
http://localhost:3000/r/Test.git

Thank you for all your time and keep up with this great Project. Testing and running it right now on FreeBSD

Dave

Screenshots

No response

Originally created by @wuda2525 on GitHub (Nov 25, 2024). ### Feature Description Hey Team, Apologies if this has been discussed or documented. I was wondering if it is possible to remove the username in the Repository URL, especially for an Admin user For example, I have an admin with a username of "bob", when I create a Repository called "Test", Gitea will provide the following URL http://localhost:3000/bob/Test.git Is it possible to get rid of the name "bob" in the path and just have it as http://localhost:3000/Test.git Or maybe the example below (where r is a short form for repository) http://localhost:3000/r/Test.git Thank you for all your time and keep up with this great Project. Testing and running it right now on FreeBSD Dave ### Screenshots _No response_
GiteaMirror added the issue/needs-feedback label 2025-11-02 10:52:10 -06:00
Author
Owner

@yp05327 commented on GitHub (Nov 25, 2024):

Different users can create repositories with the same name.
There can be many Test.git, how to know which one do you want to access?
So this is why URL contains username/organization name.

@yp05327 commented on GitHub (Nov 25, 2024): Different users can create repositories with the same name. There can be many `Test.git`, how to know which one do you want to access? So this is why URL contains username/organization name.
Author
Owner

@wxiaoguang commented on GitHub (Nov 25, 2024):

Impossible because the path is designed to be /owner/repo

If you'd like to do some tricks, you could either:

  1. Do some rewriting on reverse proxy side
  2. Use some simpler server's like git-http or serve your git repo over ssh directly.
@wxiaoguang commented on GitHub (Nov 25, 2024): Impossible because the path is designed to be `/owner/repo` If you'd like to do some tricks, you could either: 1. Do some rewriting on reverse proxy side 2. Use some simpler server's like [git-http](https://git-scm.com/book/en/v2/Git-on-the-Server-Smart-HTTP) or serve your git repo over ssh directly.
Author
Owner

@wuda2525 commented on GitHub (Nov 25, 2024):

Thanks @wxiaoguang for providing the reason why we need the owner/repo path.

Dave

@wuda2525 commented on GitHub (Nov 25, 2024): Thanks @wxiaoguang for providing the reason why we need the owner/repo path. Dave
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13752