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

Sining with GPG is failing with error gpg: error reading key: No public key #46

Open
chaitanyaavi opened this issue Jan 12, 2024 · 0 comments

Comments

@chaitanyaavi
Copy link

Describe the bug
Sining with GPG is failing with error gpg: error reading key: No public key

To Reproduce
Steps to reproduce the behavior:
I Have following Github Action
`name: Nightly tag
on:
pull_request:
branches: ["main"]

jobs:
tag:
name: Tag
runs-on: ubuntu-latest

steps:
  - name: Checkout branch "main"
    uses: actions/checkout@v4
    with:
      fetch-depth: 0 # fetch the whole repo history

  - name: Generate Git Tag
    id: generate_tag
    run: |
        MINOR_VERSION=${{ vars.AS_MINOR_VERSION }}
        MINOR_VERSION=$((MINOR_VERSION + 1))
        NEW_TAG="nightly-${{ vars.AS_MAJOR_VERSION }}.${{ vars.AS_MINOR_VERSION }}"
        echo "Generated new tag: $NEW_TAG"
        echo "NEW_TAG=$NEW_TAG" >> $GITHUB_ENV
        echo "MINOR_VERSION=$MINOR_VERSION" >> $GITHUB_ENV
  - name: Create tag
    uses: rickstaa/action-create-tag@v1
    id: "tag_create"
    with:
        tag: $NEW_TAG
        tag_exists_error: false
        message: "Github nightly release tag"
        gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
        gpg_passphrase: ${{ secrets.GPG_PASSPHRASE }}

  - name: Update nimor version veriable
    run: |
      gh variable set AS_MINOR_VERSION --body "$MINOR_VERSION"
      `

GPG Key Created from my local machine and uploaded to Github with passphrase

Getting following error on action
gpg: directory '/github/home/.gnupg' created [action-update-semver] Importing GPG key. gpg: /github/home/.gnupg/trustdb.gpg: trustdb created gpg: key <correct key id>: public key "<Correct name> <my correct email>" imported gpg: key <correct key id>: secret key imported gpg: Total number processed: 1 gpg: imported: 1 gpg: secret keys read: 1 gpg: secret keys imported: 1 [action-update-semver] Unlocking GPG key. gpg: error reading key: No public key gpg: error reading key: No public key [action-update-semver] Setup git user name, email, and signingkey. [action-create-tag] Create tag '$NEW_TAG'. Committer identity unknown *** Please tell me who you are. Run git config --global user.email "you@example.com" git config --global user.name "Your Name" to set your account's default identity. Omit --global to set the identity only in this repository. fatal: empty ident name (for <>) not allowed

Expected behavior
Tag should get created without error

Screenshots
If applicable, add screenshots to help explain your problem.

Additional context
Add any other context about the problem here.

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

1 participant