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 imported but not trusted #675

Closed
2 of 5 tasks
Jeff-Tian opened this issue Aug 18, 2024 · 4 comments
Closed
2 of 5 tasks

gpg key imported but not trusted #675

Jeff-Tian opened this issue Aug 18, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@Jeff-Tian
Copy link

Description:
Set up gpg correctly, but in the mvn deploy step failed with message:

gpg: no default secret key: No secret key
[GNUPG:] FAILURE sign 17
gpg: signing failed: No secret key

Task version:
uses: actions/setup-java@v4

Platform:

  • Ubuntu
  • macOS
  • Windows

Runner type:

  • Hosted
  • Self-hosted

Repro steps:
Repro link: https://github.com/Jeff-Tian/keycloak-services-social-weixin/actions/runs/10439001430/job/28907013626

Expected behavior:
Deploy success

Actual behavior:
Failed.

** Extra Info:**

After many runs with different debugging command, now it seems that the key imported but not trusted.

@Jeff-Tian Jeff-Tian added bug Something isn't working needs triage labels Aug 18, 2024
@Jeff-Tian Jeff-Tian changed the title gpg key not trusted gpg key imported but not trusted Aug 18, 2024
@priya-kinthali
Copy link

Hello @Jeff-Tian 👋,
Thank you for reporting this. We will investigate the issue and get back to you as soon as we have updates.

@Jeff-Tian
Copy link
Author

Thanks @priya-kinthali for the reply! But never mind, now it's succeeded. I fount this one: #100 (comment), and tried using the gpg --armor --export-secret-keys xxx, and updated the secrets then it succeeded.

Although I don't understand why the so many previous runs were failed during the mvn deploy step. The difference is that I used the value of gpg --armor export xxxx instead the gpg --armor export-secert-keys xxxx. The tricky part is both of them work in the setup-java step, ideally it should failed in that step instead of failing afterwards.

@mahabaleshwars mahabaleshwars self-assigned this Aug 28, 2024
@mahabaleshwars
Copy link
Contributor

Hello @Jeff-Tian,

It appears that the issue has been resolved.

The difference between these commands is that gpg --armor export exports a public key in ASCII-armored format, whereas gpg --armor export-secret-keys exports a secret/private key in ASCII-armored format.
You will need to provide the secret key and passphrase for GPG to work.

Please feel free to reach out to us if you encounter any other issues.

@Jeff-Tian
Copy link
Author

Thank you @mahabaleshwars !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants