Error on commit (in UI) after renaming a repository #233

Closed
opened 2025-11-02 03:14:51 -06:00 by GiteaMirror · 11 comments
Owner

Originally created by @KangoV on GitHub (Jan 14, 2017).

  • Gitea version (or commit ref): 1.0.0+109-ge5620f07
  • Git version: 2.8.3
  • Operating system: docker container: Linux 0c196eb4ba0f 4.4.0-53-generic 74-Ubuntu SMP (alpine 3.4.6)
  • Database:
    • PostgreSQL (v9.6.1)
    • MySQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No (works fine)
    • Not relevant
  • Log gist:

Description

I've renamed a repository from repository-model to domain-model. I've tried editing README.md in the Gitea UI and get this:

Failed to update/create file 'README.md' with error: 
UpdateLocalCopyBranch [branch: master]: git pull origin master: exit status 1 - fatal: 
    '/data/git/gitea-repositories/monkeys/repository-model.git' does not appear to be 
    a git repository fatal: Could not read from remote repository. Please make sure you 
    have the correct access rights and the repository exists.
  • The repository name has been changed correctly in the database.
  • The repository in gitea-repositories has been changed correctly.

I'm not sure where the old name is being picked up from.

But, A commit from Eclipse remotely works fine. This is only failing using the Gitea UI.
Update: After committing successfully from Eclipse, it still fails in the UI with the same error.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40953475-error-on-commit-in-ui-after-renaming-a-repository?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github).
Originally created by @KangoV on GitHub (Jan 14, 2017). - Gitea version (or commit ref): 1.0.0+109-ge5620f07 - Git version: 2.8.3 - Operating system: docker container: Linux 0c196eb4ba0f 4.4.0-53-generic 74-Ubuntu SMP (alpine 3.4.6) - Database: - [x] PostgreSQL (v9.6.1) - [ ] MySQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [x] No (works fine) - [ ] Not relevant - Log gist: ## Description I've renamed a repository from repository-model to domain-model. I've tried editing README.md in the Gitea UI and get this: ``` Failed to update/create file 'README.md' with error: UpdateLocalCopyBranch [branch: master]: git pull origin master: exit status 1 - fatal: '/data/git/gitea-repositories/monkeys/repository-model.git' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ``` * The repository name has been changed correctly in the database. * The repository in `gitea-repositories` has been changed correctly. I'm not sure where the old name is being picked up from. *But*, A commit from Eclipse remotely works fine. This is only failing using the Gitea UI. *Update*: After committing successfully from Eclipse, it still fails in the UI with the same error. <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40953475-error-on-commit-in-ui-after-renaming-a-repository?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F47456670&utm_medium=issues&utm_source=github). </bountysource-plugin>
GiteaMirror added the type/bug label 2025-11-02 03:14:51 -06:00
Author
Owner

@lunny commented on GitHub (Jan 15, 2017):

Didn't reproduce this.

@lunny commented on GitHub (Jan 15, 2017): Didn't reproduce this.
Author
Owner

@KangoV commented on GitHub (Jan 15, 2017):

@lunny No, neither could i on try.gitea.io. Just wondering if this was a bug and it was fixed. I can't find anything though.

@KangoV commented on GitHub (Jan 15, 2017): @lunny No, neither could i on [try.gitea.io](https://try.gitea.io). Just wondering if this was a bug and it was fixed. I can't find anything though.
Author
Owner

@KangoV commented on GitHub (Jan 15, 2017):

I've restarted the app and the error has gone away. This occurs in gogs as well according to gogs#3641.

I agree with the details in the gogs issue that it is or was a caching issue. When a new docker image is available, i'll test again.

@KangoV commented on GitHub (Jan 15, 2017): I've restarted the app and the error has gone away. This occurs in gogs as well according to [gogs#3641](https://github.com/gogits/gogs/issues/3641). I agree with the details in the gogs issue that it is or was a caching issue. When a new docker image is available, i'll test again.
Author
Owner

@tboerger commented on GitHub (Jan 16, 2017):

Looks like we can close that for now. Feel free to reopen the issue if you can reproduce it.

@tboerger commented on GitHub (Jan 16, 2017): Looks like we can close that for now. Feel free to reopen the issue if you can reproduce it.
Author
Owner

@francoism90 commented on GitHub (Feb 5, 2017):

Please re-open:

Failed to update/create file 'etc/nginx/nginx.conf' with error: UpdateLocalCopyBranch [branch: master]: git pull origin master: exit status 1 - fatal: '/var/lib/gitea/repo/francoism90/dotfiles.git' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 

Renamed dotfiles repo to arch-config in GUI. Trying to create a new file within the GUI causes this issue.

Thanks!

EDIT:
After restarting gitea, the error is gone. Seems like a caching issue?

@francoism90 commented on GitHub (Feb 5, 2017): Please re-open: ``` Failed to update/create file 'etc/nginx/nginx.conf' with error: UpdateLocalCopyBranch [branch: master]: git pull origin master: exit status 1 - fatal: '/var/lib/gitea/repo/francoism90/dotfiles.git' does not appear to be a git repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ``` Renamed dotfiles repo to arch-config in GUI. Trying to create a new file within the GUI causes this issue. Thanks! EDIT: After restarting gitea, the error is gone. Seems like a caching issue?
Author
Owner

@lunny commented on GitHub (Feb 5, 2017):

Which version are you in. @francoism90

@lunny commented on GitHub (Feb 5, 2017): Which version are you in. @francoism90
Author
Owner

@francoism90 commented on GitHub (Feb 5, 2017):

@lunny master (1.0.0+215-ge921dcf5).

FYI I'm running gitea as proxy using nginx, could this cause the caching issues?

Thanks.

@francoism90 commented on GitHub (Feb 5, 2017): @lunny master (1.0.0+215-ge921dcf5). FYI I'm running gitea as proxy using nginx, could this cause the caching issues? Thanks.
Author
Owner

@lunny commented on GitHub (Feb 5, 2017):

Cannot reproduce this. Could you mean:

  1. rename some repo to other name
  2. Click New File and write something in file name and file content
  3. Then it return an error
@lunny commented on GitHub (Feb 5, 2017): Cannot reproduce this. Could you mean: 1. rename some repo to other name 2. Click `New File` and write something in file name and file content 3. Then it return an error
Author
Owner

@francoism90 commented on GitHub (Feb 5, 2017):

@lunny correct. After restarting the gitea.service, the error is gone.

@francoism90 commented on GitHub (Feb 5, 2017): @lunny correct. After restarting the gitea.service, the error is gone.
Author
Owner

@lunny commented on GitHub (Feb 5, 2017):

So strange. Let's keep it open.

@lunny commented on GitHub (Feb 5, 2017): So strange. Let's keep it open.
Author
Owner

@lunny commented on GitHub (Dec 12, 2017):

I think this has been fixed sometime. I cannot reproduce it again. See https://try.gitea.io/lunny/ftpserver/src/branch/master/ttt.md

@lunny commented on GitHub (Dec 12, 2017): I think this has been fixed sometime. I cannot reproduce it again. See https://try.gitea.io/lunny/ftpserver/src/branch/master/ttt.md
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#233