-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GPG signatures show as untrusted for non-admins #18501
Comments
|
is github@parnic.com a verified email address for the parnic user? |
@zeripath sorry, you're right, I screwed that up. I've added a commit that uses the correct committer, same problem: https://try.gitea.io/parnic-sks/signature-test/commit/1f4ffc3844456d7d577801f2d09039c682bd195e
|
You are using the collaborator or collaboratorcommiter trustmodel. You are probably expecting to use the github compatible committer trustmodel. Change your default trustmodel to committer or change the trust model of the repository committer. (The default trustmodel for new installs will be committer from 1.17 onwards to account for this confusion.) |
Ag! That shouldn't be happening something has changed. Apologies that I misunderstood your issue. |
regression from #17917 |
There was an unintended regression in go-gitea#17917 which leads to only repository admin commits being trusted. This PR restores the old logic. Fix go-gitea#18501 Signed-off-by: Andrew Thornton <art27@cantab.net>
Backport go-gitea#18539 There was an unintended regression in go-gitea#17917 which leads to only repository admin commits being trusted. This PR restores the old logic. Fix go-gitea#18501 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Collaborator trust model should trust collaborators There was an unintended regression in go-gitea#17917 which leads to only repository admin commits being trusted. This PR restores the old logic. Fix go-gitea#18501 Signed-off-by: Andrew Thornton <art27@cantab.net>
Gitea Version
1.16.0
Git Version
2.35.0
Operating System
Ubuntu 20.04.3, aarch64/arm64
How are you running Gitea?
Built myself from tag v1.16.0
Also reproducible on https://try.gitea.io
Database
PostgreSQL
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Description
If a commit is signed from a collaborator with the GPG key added to the collaborator's account, it will show as "untrusted" in the commit list.
git log shows good signature:
That key is added to that user's try.gitea.io account, but the commit shows untrusted (using try.gitea.io's default trust model):
https://try.gitea.io/parnic-sks/signature-test/commit/1c09133de06bb343eb9ed090ca7a37e6eac46bb1edit: updated to a commit with the correct committer address: https://try.gitea.io/parnic-sks/signature-test/commit/1f4ffc3844456d7d577801f2d09039c682bd195e
Commits from the repo admin do still show as trusted, however. I suspect that's because the code seems to only be trusting repo admins. There are 4 similar calls to
CalculateTrustStatus()
, but all use thisIsUserRepoAdmin
func for theisCodeReader
argument, and pass eithernil
or an emptymap[string]bool{}
as the finalkeyMap
argument, e.g.:The only way to get the commit to show as Trusted is to change the trust model to Committer, but that causes commits from Gitea itself (such as PR squash-merges) to show as untrusted.
Screenshots
Commit:
Key added to committer's account:
Committer's collaborator status on the repo:
The text was updated successfully, but these errors were encountered: