-
-
Notifications
You must be signed in to change notification settings - Fork 6k
Open
Labels
Description
Description
Some of our developers are encountering permission issues when attempting to push changes to pull request branches, even when the "Allow edits from maintainers" option is enabled on the PR. This seems to occur specifically when Git LFS is involved.
Example 1
A maintainer attempted to push to a contributor's PR branch to resolve a merge conflict:
$ git push [email protected]:Testifya/blender Testifya-ios:ios
Host key fingerprint is SHA256:ny+vcWlA5GVdVJFduVmBIyCthgqmNAXdNShi/QSv//U
Remote "[email protected]:Testifya/blender" does not support the Git LFS locking API. Consider disabling it with:
$ git config lfs.https://git.blender.org/Testifya/blender.git/info/lfs.locksverify false
batch request: Host key fingerprint is SHA256:ny+vcWlA5GVdVJFduVmBIyCthgqmNAXdNShi/QSv//U
error:
error: User: 26576:Brainzman with Key: 1584:<key> is not authorized to write to Testifya/blender.
error:: exit status 1
Example 2
Another developer encountered a similar issue:
$ git push [email protected]:mano-wii/blender.git fix-141741:fix_141741
Remote "[email protected]:mano-wii/blender.git" does not support the Git LFS locking API. Consider disabling it with:
$ git config lfs.https://git.blender.org/mano-wii/blender.git/info/lfs.locksverify false
Uploading LFS objects: 0% (0/24), 0 B | 0 B/s, done.
batch request: error:
error: User: 13447:pragma37 with Key: 664:miguel@Miguel-Desktop is not authorized to write to mano-wii/blender.
error:: exit status 1
error: failed to push some refs to 'git.blender.org:mano-wii/blender.git'
- Using
git push --no-verify
(to bypass the LFS hook) seems to allow the push to go through, suggesting this is specifically related to Git LFS handling, but this is bad to use when you are trying to update LFS objects. - It seems that Gitea’s "Allow edits from maintainers" functionality is not correctly handling permissions for pushes that involve LFS files.
- This may be a bug or an unimplemented edge case in Gitea's permission checks for LFS when pushing to forks.
Gitea Version
1.24.3 built with GNU Make 4.4.1, go1.24.5 : bindata, timetzdata, sqlite, sqlite_unlock_notify
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
2.49.1
Operating System
Ubuntu 24.04.2
How are you running Gitea?
Non-root docker image based on fork at https://github.com/blender/gitea
Database
PostgreSQL