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

GPG KEY FAILS IF SEC KEY START FROM 0 #10591

Closed
5 tasks
phyr0s opened this issue Mar 3, 2020 · 4 comments
Closed
5 tasks

GPG KEY FAILS IF SEC KEY START FROM 0 #10591

phyr0s opened this issue Mar 3, 2020 · 4 comments
Labels
Milestone

Comments

@phyr0s
Copy link

phyr0s commented Mar 3, 2020

  • Gitea version (or commit ref):
  • Git version: 1.11.1
  • Operating system:
  • Database (use [x]):
    • PostgreSQL
    • [X ] MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • [X ] Not relevant

Description

If GPG key starts from 0, gitea doesn't recognize the key. If the key starts from other numbers it works fine, however if key starts from 0 it does not work.

...

Screenshots

Here is the key added in the config options, as you can see start from 0 the key. That key is extracted from --> gpg --list-secret-keys --keyid-format LONG -->

Captura de pantalla 2020-03-03 a las 14 56 05

This is the commit signed, gitea doesn't recognize the key
Captura de pantalla 2020-03-03 a las 15 00 04

I tried same key in GITHUB and GITLAB and woks perfect. It's means that is a bug from gitea

@sapk sapk added the type/bug label Mar 3, 2020
@sapk
Copy link
Member

sapk commented Mar 3, 2020

I wonder if this is related to #6778 where we didn't find the root cause but the key fingerprint seems to start with 0.

For this specific case can you provide a generated private/public key pair (not yours) ?
I will add it to the test suite to confirm and maybe fix the case if it is on our side.

@sapk sapk added this to the 1.11.3 milestone Mar 3, 2020
@phyr0s
Copy link
Author

phyr0s commented Mar 3, 2020

@sapk Take it, no password needed
test23.zip

@zeripath
Copy link
Contributor

zeripath commented Mar 5, 2020

@videmort so I'm not certain that is necessarily the preceding zero as that should go in to the db without the preceding zero. Could you check if it is in the db with the keyid with/without the preceding the zero?

I wonder if you're being hit with the Timezone bug?

@lunny lunny modified the milestones: 1.11.3, 1.11.4 Mar 10, 2020
@lafriks lafriks modified the milestones: 1.11.4, 1.11.5 Apr 1, 2020
@lunny lunny modified the milestones: 1.11.5, 1.11.6 May 1, 2020
zeripath added a commit to zeripath/gitea that referenced this issue May 29, 2020
@zeripath
Copy link
Contributor

Sorry I finally got round to generating a key with a zero leading ID

@techknowlogick techknowlogick modified the milestones: 1.11.6, 1.11.7 Jun 3, 2020
@techknowlogick techknowlogick modified the milestones: 1.11.7, 1.12.0 Jun 3, 2020
@go-gitea go-gitea locked and limited conversation to collaborators Nov 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants