gpg-agent не может работать на Archlinux
Я использую gpg-agent вместо ssh-agent. Моя система - MANJARO LINUX.
Сначала это работало правильно. Когда я перезапустил его, я обнаружил, что многие связанные с ssh команды не могут быть использованы. Нет вывода, только принудительный выход с помощью команды Ctrl+C
Вот моя конфигурация и журнал:
➜ .gnupg uname -a
Linux turingking-pc 4.14.47-1-MANJARO #1 SMP PREEMPT Thu May 31 06:19:52 UTC 2018 x86_64 GNU/Linux
➜ .gnupg gpg -K
^C
gpg: signal Interrupt caught ... exiting
➜ .gnupg gpg -K --debug-all
gpg: Note: no default option file '/home/turingking/.gnupg/gpg.conf'
gpg: enabled debug flags: packet mpi crypto filter iobuf memory cache memstat trust hashing ipc clock lookup extprog
gpg: DBG: [not enabled in the source] start
gpg: DBG: [not enabled in the source] keydb_new
gpg: DBG: [not enabled in the source] keydb_search_reset
gpg: DBG: keydb_search: reset (hd=0x000055feccb104c0)
gpg: DBG: [not enabled in the source] keydb_search enter
gpg: DBG: keydb_search: 1 search descriptions:
gpg: DBG: keydb_search 0: FIRST
gpg: DBG: keydb_search: searching keybox (resource 0 of 1)
gpg: DBG: keydb_search: searched keybox (resource 0 of 1) => Success
gpg: DBG: [not enabled in the source] keydb_search leave (found)
gpg: DBG: [not enabled in the source] keydb_get_keybock enter
gpg: DBG: parse_packet(iob=1): type=6 length=397 (parse.keydb.c.1242)
gpg: DBG: parse_packet(iob=1): type=12 length=38 (parse.keydb.c.1242)
gpg: DBG: parse_packet(iob=1): type=2 length=415 (parse.keydb.c.1242)
gpg: DBG: parse_packet(iob=1): type=12 length=6 (parse.keydb.c.1242)
gpg: DBG: parse_packet(iob=1): type=13 length=30 (parse.keydb.c.1242)
gpg: DBG: parse_packet(iob=1): type=12 length=12 (parse.keydb.c.1242)
gpg: DBG: parse_packet(iob=1): type=2 length=432 (parse.keydb.c.1242)
gpg: DBG: parse_packet(iob=1): type=12 length=6 (parse.keydb.c.1242)
gpg: DBG: parse_packet(iob=1): type=14 length=397 (parse.keydb.c.1242)
gpg: DBG: parse_packet(iob=1): type=2 length=415 (parse.keydb.c.1242)
gpg: DBG: parse_packet(iob=1): type=12 length=6 (parse.keydb.c.1242)
gpg: DBG: parse_packet(iob=1): type=14 length=397 (parse.keydb.c.1242)
gpg: DBG: parse_packet(iob=1): type=2 length=830 (parse.keydb.c.1242)
gpg: DBG: parse_packet(iob=1): type=12 length=6 (parse.keydb.c.1242)
gpg: DBG: iobuf-1.0: underflow: buffer size: 3422; still buffered: 0 => space for 3422 bytes
gpg: DBG: iobuf-1.0: close '?'
^C
gpg: signal Interrupt caught ... exiting
➜ .gnupg ssh-add -L
^C
➜ .gnupg ssh root@192.168.18.1
^C
➜ .gnupg cat gpg-agent.conf
enable-ssh-support
default-cache-ttl 3600
# PIN entry program
# pinentry-program /usr/bin/pinentry-curses
# pinentry-program /usr/bin/pinentry-qt
# pinentry-program /usr/bin/pinentry-kwallet
pinentry-program /usr/bin/pinentry-gtk-2
➜ .gnupg
в моем.zshrc:
# Start the gpg-agent if not already running
if ! pgrep -x -u "${USER}" gpg-agent >/dev/null 2>&1; then
gpg-connect-agent /bye >/dev/null 2>&1
fi
# Set SSH to use gpg-agent
unset SSH_AGENT_PID
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
fi
# Set GPG TTY
export GPG_TTY=$(tty)
# Refresh gpg-agent tty in case user switches into an X session
gpg-connect-agent updatestartuptty /bye >/dev/null
gpg -k работает, gpg -K не работает.
➜ ~ gpg -k
/home/turingking/.gnupg/pubring.kbx
-----------------------------------
pub rsa3072 2018-05-03 [C] [revoked: 2018-05-03]
494CA29A892367508916F58D53DA4CCE12D1FC19
uid [ revoked] 冷树 <jinhan13789@gmail.com>
pub rsa2048 2018-03-15 [SC] [expires: 2020-03-14]
0D18E542FDC65A92612661C5C8518CF6DEDCB465
uid [ unknown] turing-king <jinhan13789@gmail.com>
sub rsa2048 2018-03-15 [E] [expires: 2020-03-14]
sub rsa2048 2018-03-15 [S] [expires: 2019-03-15]
sub rsa2048 2018-03-15 [E] [expires: 2019-03-15]
sub rsa2048 2018-03-15 [A] [expires: 2019-03-15]
➜ ~ gpg -K
^C
gpg: signal Interrupt caught ... exiting
Помоги мне, большое спасибо:)