Skip to content
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

Gitea doesn't recognize my GPG key #2401

Closed
2 of 7 tasks
sondr3 opened this issue Aug 25, 2017 · 14 comments
Closed
2 of 7 tasks

Gitea doesn't recognize my GPG key #2401

sondr3 opened this issue Aug 25, 2017 · 14 comments
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.

Comments

@sondr3
Copy link
Contributor

sondr3 commented Aug 25, 2017

Description

I've added my GPG key to a 1.2-rc1 version of Gitea that I'm running, and it says that it can't find any key matching my email for that address. Github recognizes it and supports it just fine, but Gitea for some reason doesn't. I can't recall what settings I used to generate the GPG key anymore, it's been a while since I created it.

Screenshots

screen shot 2017-08-26 at 00 39 52

screen shot 2017-08-26 at 00 40 07

@sondr3 sondr3 changed the title GPG doesn't recognize my key Gitea doesn't recognize my GPG key Aug 25, 2017
@lunny lunny added the type/bug label Aug 26, 2017
@lunny lunny added this to the 1.x.x milestone Aug 26, 2017
@sapk
Copy link
Member

sapk commented Aug 27, 2017

It seems that it's not the key you used to sign the commit. When I clone your repo example on try.gitea.io, I get that you sign with RSA D78D17BB14716F42

@sapk
Copy link
Member

sapk commented Aug 27, 2017

To verify that :

git clone https://try.gitea.io/sondr3/test1.git
cd test1
git log --show-signature

@sondr3
Copy link
Contributor Author

sondr3 commented Aug 27, 2017

Yeah, this was my fault. Apparently I had exported a subkey and not the actual GPG key itself, so I was using the wrong one. My bad, thanks for pointing it out, it works fine now that I'm using the correct one.

@sondr3 sondr3 closed this as completed Aug 27, 2017
@sapk
Copy link
Member

sapk commented Aug 27, 2017

Glad to here that. enjoy 😄

@lunny lunny removed this from the 1.x.x milestone Aug 28, 2017
@lunny lunny added type/question Issue needs no code to be fixed, only a description on how to fix it yourself. and removed type/bug labels Aug 28, 2017
@Mikaela
Copy link
Contributor

Mikaela commented Jun 6, 2018

I was having this issue with key 29104A46C5615BF978A083F20C207F07B2F32B67 until I removed it from Gitea and added again with gpg --export-options export-minimal --export 29104A46C5615BF978A083F20C207F07B2F32B67.

Gitea kept saying No known key found for this signature in database and the person running the Gitea instance thought that it may be a problem with amount of subkeys that I have.

@lunny
Copy link
Member

lunny commented Jun 6, 2018

@Mikaela Please fire another issue since your problem is different from this one.

@Mikaela
Copy link
Contributor

Mikaela commented Jun 6, 2018

@lunny I don't know what subject to use or anything and I managed to get it workarounded. As the symptom is the same as in the subject of this one, I think this should be reopened in case you can reproduce the issue.

@Panzer1119
Copy link

I have a similiar/the same problem, but when i imported the public gpg key on my pc it shows the signature is verified (git log --show-signature).
But when i use the exact same String (public gpg key in ascii form) in my Gitea Account, it does not recognize the signature of commits.
(Its a 2048 Bit rsa gpg key, maybe thats a problem? Because my 4096 Bit rsa gpg key does work)
The fingerprints of the key shown by git log --show-signature and on Gitea are also the same :/

@Panzer1119
Copy link

Hmmm i created a new keypair (2048 Bits rsa) and signed it via my ios app (where i had problem with signed commits) and it did not work.
Then i importet this keypair on my pc and signed a new commit from the pc.
Now Gitea recognizes the key.

But in both cases my local git recognized both signatures made from the ios app and the pc...

@lunny
Copy link
Member

lunny commented Mar 15, 2019

@Panzer1119 any log on your backend?

@Panzer1119
Copy link

What kinda log? I believe the App is creating the signature different than the computer?

@pedroapero
Copy link

pedroapero commented Apr 1, 2019

I'm using gnupg 1.4.18 from Debian with a 4096Bits key, I am not able to confirm signed tags either (open padlock with "not a signed commit").
My key pair (master + one subkey) was imported correctly on my account.
Using git verify-tag I can verify that the tag is signed with one of the keys displayed on my settings page. I can't make Gitea (v1.7.3) display the tag's signature key ID though.

Edit: after some testing, the problem appears with tags only, the padlock is green for commits.

@georgeowell
Copy link

georgeowell commented Apr 7, 2020

I am having this same problem but for commits. Can verify the commits locally all good, all using the same key.

But in Gitea, they are now marked as
WARNING! Although there is a key with this ID in the database it does not verify this commit! This commit is SUSPICIOUS. GPG Key ID: EDE939629F5C1A6A

https://git.autonomic.zone/kawaiipunk/walkaway-wiki/commits/branch/master

As far as I know, nothing has changed in my configs. Signing is working all good on Gitlab and Github. I just can't see any problems except at the Gitea end of things.

My .gitconfig:

[user]
	name = kawaiipunk
	email = [redacted this for obscurity but it matches all good]
	signingkey = DAFA9CA84CFD48F5FCEACEAAEDE939629F5C1A6A
[push]
	default = simple
[commit]
	gpgsign = true
[gpg]
	program = gpg
[tag]
	forceSignAnnotated = true

I tried re-adding my GPG pub key to the Gitea interface in a few different ways but same story.

@zeripath
Copy link
Contributor

zeripath commented Apr 7, 2020

@georgeowell Please don't write on closed issues - comments are very likely to be missed.

This is a different problem to the OPs issue - although it fits with the previous person who also wrote on an already closed issue. My initial suspicion is that you are hitting #10420 but without knowing your version I cannot confirm.

We need to know what version of Gitea you are running.

@go-gitea go-gitea locked and limited conversation to collaborators Apr 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type/question Issue needs no code to be fixed, only a description on how to fix it yourself.
Projects
None yet
Development

No branches or pull requests

8 participants