質問: key expires in n years key is valid for? (0) 1y key expires at thu 12 jul 2018 04:32:05 pm utc is this correct? (y/n) y gnupg needs to construct a user id to identify your key. real name: somename email address: example@gmail.com comment: you selected this user-id: "somename <example@gmail.com>" change (n)ame, (c)omment, (e)mail or (o)kay/(q)uit? o you need a passphrase to protect your secret key. gpg: cancelled by user gpg: key generation canceled. [apt@devserver ~]$
回答: これに答えるのはおそらく遅すぎますが、オプションの1つは、export gpg_tty=$(tty)を使用して、パスフレーズプロンプトに使用するttyをgpgに通知することです。