GPGキーが生成されない:gpgのAgent_genkeyがいくつかのファイルを探しています。

GPGキーが生成されない:gpgのAgent_genkeyがいくつかのファイルを探しています。

MacでGPGキーを生成する際に問題があります(10.15.7 Catalina)。agent_genkey利用できないファイルを探しているというエラーが表示されます。以下はデバッグ情報です。

% gpg --gen-key -vvvvv   
gpg (GnuPG) 2.3.1; Copyright (C) 2021 Free Software Foundation, Inc.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

gpg: using character set 'utf-8'
gpg: Note: RFC4880bis features are enabled.
gpg: directory '/Users/test/.gnupg' created
gpg: keybox '/Users/test/.gnupg/pubring.kbx' created
Note: Use "gpg --full-generate-key" for a full featured key generation dialog.

GnuPG needs to construct a user ID to identify your key.

Real name: test name
Email address: [email protected]
You selected this USER-ID:
    "test name <[email protected]>"

Change (N)ame, (E)mail, or (O)kay/(Q)uit? O
We need to generate a lot of random bytes. It is a good idea to perform
some other action (type on the keyboard, move the mouse, utilize the
disks) during the prime generation; this gives the random number
generator a better chance to gain enough entropy.
gpg: no running gpg-agent - starting '/usr/local/Cellar/gnupg/2.3.1/bin/gpg-agent'
gpg: waiting for the agent to come up ... (5s)
gpg: connection to the agent established
gpg: pinentry launched (12023 curses 1.1.1 /dev/ttys002 xterm-256color - ? 502/20 0)
gpg: agent_genkey failed: No such file or directory
Key generation failed: No such file or directory

gpgバージョンは2.3.1gitバージョンです 2.30.0

% gpg --version
gpg (GnuPG) 2.3.1
libgcrypt 1.9.3

私は様々な投稿に提供された提案を試しました。たとえば、ホームディレクトリの削除(〜/ .gnupg)、停止、パッケージの再gpg-agentインストール(brewを使用)。gpg

約1ヶ月前に働いた。前のキーにはいくつかの問題がありました。それで、それらをすべて削除して新しいものを作成する必要があります。ここで問題が始まります。再インストールする前にgpgキーの生成がタイムアウトします。ddランダム性を生成するのに役立つコマンドを実行しました。しかし、それも動作しません。

ベストアンサー1

存在するこの問題これは、端末に関連するデバイスファイルの所有権が不足しているために予想される動作と呼ばれます。たとえば、通常のユーザーとしてターミナルを起動しましたが、次のコマンドを実行したときにgpgこれが発生する可能性があります。またはsusudo

chmod狂ったスタントをする代わりに/devこのコメントクイックフィックスの使用を示しますtmux。デフォルトでは、セッションgpgで同じコマンドを実行するtmuxと、tmux正しいデバイスファイルの所有権が処理されます。

おすすめ記事