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

signing failed: No secret key #33

Open
linouk23 opened this issue Mar 5, 2023 · 1 comment
Open

signing failed: No secret key #33

linouk23 opened this issue Mar 5, 2023 · 1 comment

Comments

@linouk23
Copy link

linouk23 commented Mar 5, 2023

Hi there,

First of all, thanks to you all for creating such an amazing project!

I've been trying to update my project to use https://github.com/goreleaser/goreleaser-cross instead of https://github.com/goreleaser/goreleaser.

More specifically, I've updated this line to be make release-dry-run to match this.

However, I've been getting an error during make release step (more specifically, during signing artifacts step):

...
    • signing                                        artifact=terraform-provider-confluent-internal_1.34.4_SHA256SUMS cmd=gpg signature=dist/terraform-provider-confluent-internal_1.34.4_SHA256SUMS.sig02:34
  ⨯ release failed after 36s                 error=sign: gpg failed: exit status 2: gpg: directory '/root/.gnupg' created02:34
gpg: keybox '/root/.gnupg/pubring.kbx' created02:34
gpg: skipped "766DB83696A47670296E603FD4A2B1EDB0EC0C8E": No secret key # where 766... is my GPG_FINGERPRINT
gpg: signing failed: No secret key
make: *** [Makefile:125: release-dry-run] Error 1

I double checked the README but it only references 3 env vars and Goreleaser variables (that I didn't manage to find a full list of):
image.

Here's a list of env vars I do provide:

          - 'echo "GOPATH=${GOPATH}" >> .release-env'
          - 'echo "GPG_FINGERPRINT=${GPG_FINGERPRINT}" >> .release-env'
          - 'echo "GPG_PASSWORD=${GPG_PASSWORD}" >> .release-env'
          - 'echo "GPG_KEY=${GPG_PRIVATE_KEY}" >> .release-env'

If that helps, here's a project that seems to be related that shares:

        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
          GORELEASER_KEY: ${{ secrets.GORELEASER_PRO_KEY }}
@linouk23 linouk23 changed the title Map has no entry for key "GPG_FINGERPRINT" signing failed: No secret key Mar 5, 2023
@troian
Copy link
Member

troian commented Apr 6, 2023

hi, sorry for late reply.
does /root/.gnupg have private key in it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants