Gitea no longer GPG signs commits made on the web interface #151

Closed
opened 2022-06-10 20:42:16 +00:00 by a · 8 comments
Owner

For example, my latest website commits have not been signed: https://git.exozy.me/Ta180m/website/commits/branch/main

Also, https://git.exozy.me/api/v1/signing-key.gpg should display the public key but it displays nothing.

I suspect this bug is caused by us using the Gitea main branch instead of a release, so a recent commit probably broke this. I'm not sure if this has been reported to Gitea upstream yet.

For example, my latest website commits have not been signed: https://git.exozy.me/Ta180m/website/commits/branch/main Also, https://git.exozy.me/api/v1/signing-key.gpg should display the public key but it displays nothing. I suspect this bug is caused by us using the Gitea main branch instead of a release, so a recent commit probably broke this. I'm not sure if this has been reported to Gitea upstream yet.
a added the
bug
label 2022-06-10 20:42:16 +00:00
a added this to the (deleted) project 2022-06-10 20:42:16 +00:00
Author
Owner

I did a git bisect and a0051634b9 is the bad commit.

I did a `git bisect` and https://github.com/go-gitea/gitea/commit/a0051634b982608d94399033a8b76e7e3b1537ac is the bad commit.
Author
Owner

Yay, that PR is a breaking change so using bleeding edge main code is always a fun time. Welp that's what life is like being a Gitea contributor...

The fix is to move the .gitconfig from the Gitea home directory /var/lib/gitea to /var/lib/gitea/repos since Gitea uses a private config directory now.

Yay, that PR is a [breaking change](https://github.com/go-gitea/gitea/pull/19732) so using bleeding edge main code is always a fun time. Welp that's what life is like being a Gitea contributor... The fix is to move the `.gitconfig` from the Gitea home directory `/var/lib/gitea` to `/var/lib/gitea/repos` since Gitea uses a private config directory now.
a closed this issue 2022-06-11 03:39:27 +00:00
Author
Owner

Crap:

Unable to commit-tree in temporary repo: Ta180m/Hello-world Error: exit status 1
Stdout:
Stderr: error: gpg failed to sign the data
Crap: ``` Unable to commit-tree in temporary repo: Ta180m/Hello-world Error: exit status 1 Stdout: Stderr: error: gpg failed to sign the data ```
a reopened this issue 2022-06-11 03:44:36 +00:00
Author
Owner

Moving the .gnupg directory to /var/lib/gitea/repos fixes that issue.

Moving the `.gnupg` directory to `/var/lib/gitea/repos` fixes that issue.
a closed this issue 2022-06-11 03:50:29 +00:00
a reopened this issue 2022-06-11 03:52:43 +00:00
Author
Owner

I'm getting the error ...mmit_verification.go:269:verifyWithGPGSettings() [E] Unable to get default signing key: failed to parse gpg key openpgp: invalid argument: no armored data found now.

I'm getting the error `...mmit_verification.go:269:verifyWithGPGSettings() [E] Unable to get default signing key: failed to parse gpg key openpgp: invalid argument: no armored data found` now.
Author
Owner

So apparently you need to have the .gnupg folder copied in both the Gitea home and the repos folder... not sure about the reason for that but the bug is now fixed.

So apparently you need to have the `.gnupg` folder copied in both the Gitea home and the `repos` folder... not sure about the reason for that but the bug is now fixed.
a closed this issue 2022-06-11 03:54:32 +00:00
Author
Owner

This bug has returned!!!

This bug has returned!!!
a reopened this issue 2022-07-12 17:03:36 +00:00
Author
Owner

It looks like Gitea now uses the /var/lib/gitea/data/home directory for storing its .gitconfig and .gnupg directory according to the latest docs, so copying these files to that new location fixed the bug.

Welp, that's what it's like deploying and running the Gitea main branch...

It looks like Gitea now uses the `/var/lib/gitea/data/home` directory for storing its `.gitconfig` and `.gnupg` directory according to the [latest docs](https://docs.gitea.io/en-us/signing/#signing_key), so copying these files to that new location fixed the bug. Welp, that's what it's like deploying and running the Gitea main branch...
a closed this issue 2022-07-12 17:11:22 +00:00
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: exozyme/exozyme#151
No description provided.