Sining with GPG is failing with error gpg: error reading key: No public key
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 "[email protected]" 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.