Skip to content

Error raised if '.gnupg/gpg-agent.conf' does not exist #176

@melanciani

Description

@melanciani

Behaviour

The action failed to run and raised Error: ENOENT: no such file or directory, open '.gnupg/gpg-agent.conf' when trying to configure the GnuPG agent

Steps to reproduce this issue

I used the action for signing tags in the following step :

      - name: Import GPG key
        uses: crazy-max/ghaction-import-gpg@v5
        with:
          gpg_private_key: ${{ secrets.BOT_GPG_PRIVATE_KEY }}
          passphrase: ${{ secrets.BOT_GPG_PASSPHRASE }}
          git_user_signingkey: true
          git_tag_gpgsign: true

Expected behaviour

The action should work without raising an issue. If the file does not exist, I believe it should be created instead.

Actual behaviour

The following error was raised : Error: ENOENT: no such file or directory, open '.gnupg/gpg-agent.conf'

Configuration

Complete yaml can be found here.

Logs

Action logs

Run crazy-max/ghaction-import-gpg@v5
  with:
    gpg_private_key: ***
  
    passphrase: ***
    git_user_signingkey: true
    git_tag_gpgsign: true
    git_config_global: false
    git_commit_gpgsign: false
    git_push_gpgsign: if-asked
    workdir: .
  env:
    ACTION_RUN_URL: https://github.com/zama-ai/concrete-ml/actions/runs/6010454835
    IS_RC: True
    GIT_TAG: v1.2.0-rc0
    RELEASE_BRANCH_NAME: release/1.2.x
GnuPG info
  Version    : 2.2.19 (libgcrypt 1.8.5)
  Libdir     : /usr/lib/x86_64-linux-gnu/gnupg
  Libexecdir : /usr/lib/gnupg
  Datadir    : /usr/share/gnupg
  Homedir    : /root/.gnupg
GPG private key info
  Fingerprint  : 05BB1A52365C60244EB41DB3818604E7F89DE1C0
  KeyID        : 818604E7F89DE1C0
  Name         : Zama Bot
  Email        : zama-bot@zama.ai
  CreationTime : Tue Aug 29 2023 10:23:37 GMT+0200 (Central European Summer Time)
Fingerprint to use
  05BB1A52365C60244EB41DB3818604E7F89DE1C0
Importing GPG private key
  gpg: directory '/root/.gnupg' created
  gpg: keybox '/root/.gnupg/pubring.kbx' created
  gpg: /root/.gnupg/trustdb.gpg: trustdb created
  gpg: key 818604E7F89DE1C0: public key "Zama Bot (GPG key to enable the Zama bot to sign git commits) <zama-bot@zama.ai>" imported
  gpg: key 818604E7F89DE1C0: secret key imported
  gpg: Total number processed: 1
  gpg:               imported: 1
  gpg:       secret keys read: 1
  gpg:   secret keys imported: 1
Configuring GnuPG agent
Error: ENOENT: no such file or directory, open '.gnupg/gpg-agent.conf'

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions