Adopt repository case errors #6654

Closed
opened 2025-11-02 07:02:39 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @LukeMauldin on GitHub (Jan 7, 2021).

  • Gitea version (or commit ref): 1.13.0 - downloaded from Github release, running via systemd
  • Git version: 2.27
  • Operating system: RHEL 8.3
  • Database (use [x]):
    • [ X ] PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • [ X ] No

Description

When using the Adopt repository functionality I have run into 2 bugs.

  1. When the repository name is mixed case, it does not show up on the "Adopt Repositories" web page and it will not work via the API. Example: If the repository is named: /var/lib/gitea/repos/archive/TestRepo/, it will not show up on the web page and not work via the API. If the repository is named /var/lib/gitea/repos/archive/testrepo/then the adoption functionality will work as expected. A work-around is to name the repository as lower-case for the import and then do an API call to update the name to mixed case.
  2. When the organization name is mixed case, it does show up on the "Adopt Repositories" web page but the Adopt fails without an error and refreshes the screen. Also, it will not work via the API. Example: If the repository is named /var/lib/gitea/repos/Archive/testrepo/, it will show up on the web page but the Adopt will not work and the API will not work. There is no practical work-around for this issue except to have all organizations named lower case but that would break other applications that depend on the correct casing.
Originally created by @LukeMauldin on GitHub (Jan 7, 2021). <!-- NOTE: If your issue is a security concern, please send an email to security@gitea.io instead of opening a public issue --> <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Make sure it's not mentioned in the FAQ (https://docs.gitea.io/en-us/faq) 5. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.13.0 - downloaded from Github release, running via systemd - Git version: 2.27 - Operating system: RHEL 8.3 - Database (use `[x]`): - [ X ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ X ] No ## Description When using the Adopt repository functionality I have run into 2 bugs. 1) When the repository name is mixed case, it does not show up on the "Adopt Repositories" web page and it will not work via the API. Example: If the repository is named: `/var/lib/gitea/repos/archive/TestRepo/`, it will not show up on the web page and not work via the API. If the repository is named `/var/lib/gitea/repos/archive/testrepo/`then the adoption functionality will work as expected. A work-around is to name the repository as lower-case for the import and then do an API call to update the name to mixed case. 2) When the organization name is mixed case, it does show up on the "Adopt Repositories" web page but the Adopt fails without an error and refreshes the screen. Also, it will not work via the API. Example: If the repository is named `/var/lib/gitea/repos/Archive/testrepo/`, it will show up on the web page but the Adopt will not work and the API will not work. There is no practical work-around for this issue except to have all organizations named lower case but that would break other applications that depend on the correct casing.
GiteaMirror added the issue/not-a-bug label 2025-11-02 07:02:39 -06:00
Author
Owner

@zeripath commented on GitHub (Jan 7, 2021):

That is because Gitea does not and will not create repositories with capitals in their folder names.

@zeripath commented on GitHub (Jan 7, 2021): That is because Gitea does not and will not create repositories with capitals in their folder names.
Author
Owner

@zeripath commented on GitHub (Jan 7, 2021):

And the repo is suppose to be a bare repo like testrepo.git

@zeripath commented on GitHub (Jan 7, 2021): And the repo is suppose to be a bare repo like testrepo.git
Author
Owner

@zeripath commented on GitHub (Jan 7, 2021):

Gitea's repos are meant to be Gitea's alone - it is not intended that other applications are to be allowed to use its repos without deep understanding of how Gitea uses its repos.

@zeripath commented on GitHub (Jan 7, 2021): Gitea's repos are meant to be Gitea's alone - it is not intended that other applications are to be allowed to use its repos without deep understanding of how Gitea uses its repos.
Author
Owner

@LukeMauldin commented on GitHub (Jan 10, 2021):

By using lower case organization and repository names I was able to work around the errors I was getting previously.

@LukeMauldin commented on GitHub (Jan 10, 2021): By using lower case organization and repository names I was able to work around the errors I was getting previously.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6654