-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
Description
We have encountered an issue in our Gitea instance involving repository access controls. When a contributor who has only read access to a repository attempts to push changes, the operation fails with a "no repository found" error message.
This behavior is misleading, as it suggests the repository does not exist, whereas the actual problem is insufficient permissions to push.
Logs
((repo) is the name of the repo)
2025/07/31 06:49:17 HTTPRequest [I] router: completed GET /(repo).git/info/refs?service=git-receive-pack for 14.99.176.2:0, 401 Unauthorized in 5.3ms @ repo/githttp.go:511(repo.GetInfoRefs)
2025/07/31 06:49:17 HTTPRequest [I] router: completed GET /(repo).git/info/refs?service=git-receive-pack for 14.99.176.2:0, 404 Not Found in 41.3ms @ repo/githttp.go:511(repo.GetInfoRefs)
Steps to Reproduce
- Assign a user read-only access to a repository.
- The user attempts to execute a
git push
command targeting that repository. - The push operation fails, returning a "no repository found" error rather than a permission error.
Gitea Version
1.24.2
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Run through Direct binary on a systemd service
Database
MySQL/MariaDB