
먼저 비슷한 제목의 답변을 시도하는 데 한 시간을 보냈으므로 이 질문을 중복으로 표시하기 전에 이 내용을 끝까지 읽어 보십시오.
나는 스마트 카드 기능을 사용하여 PGP 개인 키를 저장하기 위해 YubiKey를 사용합니다.
SSH(트리거 pinentry-mac
)를 사용하여 서버에 연결할 수 있으므로 개인 키가 작동하는지 확인합니다.
$ cat .gnupg/gpg-agent.conf
enable-ssh-support
default-cache-ttl-ssh 60
max-cache-ttl-ssh 120
default-cache-ttl 60
max-cache-ttl 120
pinentry-program /usr/local/bin/pinentry-mac
gpg: decryption failed: No secret key
YubiKey 스마트 카드가 잠금 해제되지 않은 상태에서 명령을 실행하면 오류가 발생 합니다 gpg
.
$ gpg --decrypt /path/to/file.asc
gpg: encrypted with RSA key, ID redacted
gpg: encrypted with 4096-bit RSA key, ID redacted, created redacted
redacted
gpg: public key decryption failed: Broken pipe
gpg: decryption failed: No secret key
위의 오류가 발생하면 SSH Triggers 를 사용하여 서버에 연결하고 실행하고 pinentry-mac
트리거 ctrl+c
됩니다 .gpg --decrypt /path/to/file.asc
pinentry-mac
여기서 무슨 일이 일어나고 있는 걸까요? 먼저 gpg --decrypt /path/to/file.asc
사용하지 않고 어떻게 출근할 수 있나요 ssh
?
아마 뭔가 빠졌을 것 같아요!
답변1
GnuPG를 버전에서 사용 2.2.22
으로 업그레이드하면 문제가 해결되었습니다.2.2.23
brew upgrade