Cannot rename non-empty repositories #7598

Closed
opened 2025-11-02 07:30:55 -06:00 by GiteaMirror · 8 comments
Owner

Originally created by @arcvetkovic on GitHub (Jul 18, 2021).

  • Gitea version (or commit ref): 1.14.4
  • Git version: 2.31.1
  • Operating system: Windows Server 2019. Using an official download, installed in C:\gitea, run from command prompt (either as an admin or a regular user).
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
  • Log gist:

Description

I'm able to rename empty repositories. However, I get the following error when I try to rename repositories that contain commits:

2021/07/18 11:32:00 ...ters/repo/setting.go:102:SettingsPost() [E] ChangeRepositoryName: rename repository directory: rename D:\gitea\data\gitea-repositories\arcvetkovic\test.git D:\gitea\data\gitea-repositories\arcvetkovic\test1.git: The process cannot access the file because it is being used by another process.

What I've tried so far:

  • I wasn't able to identify any processes using the file(s) (e.g., by using Process Explorer or similar solutions).
  • After rebooting the server, the error is still there.
  • Also checked that my user has modify/write permission (I'm able to rename directories by hand).
  • Tried moving Gitea data from D: disk to C: as well.
  • Finally, did a clean install, not only on the server but on a laptop with Windows 10 -- getting the same behavior.

Screenshots

Originally created by @arcvetkovic on GitHub (Jul 18, 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.14.4 - Git version: 2.31.1 - Operating system: Windows Server 2019. Using an official download, installed in `C:\gitea`, run from command prompt (either as an admin or a regular user). <!-- Please include information on whether you built gitea yourself, used one of our downloads or are using some other package --> <!-- Please also tell us how you are running gitea, e.g. if it is being run from docker, a command-line, systemd etc. ---> <!-- If you are using a package or systemd tell us what distribution you are using --> - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No - Log gist: <!-- It really is important to provide pertinent logs --> <!-- Please read https://docs.gitea.io/en-us/logging-configuration/#debugging-problems --> <!-- In addition, if your problem relates to git commands set `RUN_MODE=dev` at the top of app.ini --> ## Description <!-- If using a proxy or a CDN (e.g. CloudFlare) in front of gitea, please disable the proxy/CDN fully and connect to gitea directly to confirm the issue still persists without those services. --> I'm able to rename empty repositories. However, I get the following error when I try to rename repositories that contain commits: ``` 2021/07/18 11:32:00 ...ters/repo/setting.go:102:SettingsPost() [E] ChangeRepositoryName: rename repository directory: rename D:\gitea\data\gitea-repositories\arcvetkovic\test.git D:\gitea\data\gitea-repositories\arcvetkovic\test1.git: The process cannot access the file because it is being used by another process. ``` What I've tried so far: - I wasn't able to identify any processes using the file(s) (e.g., by using Process Explorer or similar solutions). - After rebooting the server, the error is still there. - Also checked that my user has modify/write permission (I'm able to rename directories by hand). - Tried moving Gitea data from `D:` disk to `C:` as well. - Finally, did a clean install, not only on the server but on a laptop with Windows 10 -- getting the same behavior. ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** -->
GiteaMirror added the issue/duplicate label 2025-11-02 07:30:55 -06:00
Author
Owner

@zeripath commented on GitHub (Jul 18, 2021):

Can you compile Gitea or try the build mentioned here:

https://github.com/go-gitea/gitea/pull/16439#issuecomment-881457812

@onlygecko for the avoidance of future problems could you please test #16463?

https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16463-windows-4.0-amd64.exe is a windows build of 1.14 with #16463 compiled in. (Once it uploads to my server of course.)

https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16463-windows-4.0-amd64.exe.asc is the gpg signature signed by my key if you want to assert that this from me.

This should be fixed by https://github.com/go-gitea/gitea/pull/16463

@zeripath commented on GitHub (Jul 18, 2021): Can you compile Gitea or try the build mentioned here: https://github.com/go-gitea/gitea/pull/16439#issuecomment-881457812 > @onlygecko for the avoidance of future problems could you please test #16463? > > https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16463-windows-4.0-amd64.exe is a windows build of 1.14 with #16463 compiled in. (Once it uploads to my server of course.) > > https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16463-windows-4.0-amd64.exe.asc is the gpg signature signed by my key if you want to assert that this from me. This should be fixed by https://github.com/go-gitea/gitea/pull/16463
Author
Owner

@arcvetkovic commented on GitHub (Jul 18, 2021):

I tried https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16463-windows-4.0-amd64.exe, but didn't work (same error message).

@arcvetkovic commented on GitHub (Jul 18, 2021): I tried https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16463-windows-4.0-amd64.exe, but didn't work (same error message).
Author
Owner

@zeripath commented on GitHub (Jul 18, 2021):

Please try:

https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16481-windows-4.0-amd64.zip

which contains a build of 1.14 with #16481 and it's gpg signature.

@zeripath commented on GitHub (Jul 18, 2021): Please try: https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16481-windows-4.0-amd64.zip which contains a build of 1.14 with #16481 and it's gpg signature.
Author
Owner

@arcvetkovic commented on GitHub (Jul 19, 2021):

Unfortunately, didn't work.

@arcvetkovic commented on GitHub (Jul 19, 2021): Unfortunately, didn't work.
Author
Owner

@zeripath commented on GitHub (Jul 19, 2021):

OK let's try:

https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16481-attempt2-windows-4.0-amd64.zip

This just attempts to wait again.

@zeripath commented on GitHub (Jul 19, 2021): OK let's try: https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16481-attempt2-windows-4.0-amd64.zip This just attempts to wait again.
Author
Owner

@zeripath commented on GitHub (Jul 19, 2021):

@arcvetkovic

@zeripath commented on GitHub (Jul 19, 2021): @arcvetkovic
Author
Owner

@arcvetkovic commented on GitHub (Jul 19, 2021):

Apologies, stuck at work.

With https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16481-attempt2-windows-4.0-amd64.zip renaming works.

@arcvetkovic commented on GitHub (Jul 19, 2021): Apologies, stuck at work. With https://www.eldritchkitty.com/~andrew/gitea-1.14.5-16481-attempt2-windows-4.0-amd64.zip renaming works.
Author
Owner

@zeripath commented on GitHub (Jul 19, 2021):

Cool. OK I'll add the necessary bits up.

@zeripath commented on GitHub (Jul 19, 2021): Cool. OK I'll add the necessary bits up.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#7598