The default configuration is incorrect for GnuPG <2.3
krzys-h opened this issue · comments
Hi! I just updated win-gpg-agent to v1.4.2 and it stopped working. I was running the default configuration (no agent-gui.conf
file present at all).
It seems that after 2fafd8e gpg.socketdir
defaults to a value which is correct for GnuPG 2.3+, but doesn't work for older versions. Note that the latest version of GPG4Win still ships with GnuPG 2.2.28.
After creating the agent-gui.conf
file with the following contents:
gpg:
socketdir: "${APPDATA}\\gnupg"
everything seems to work fine again.
win-gpg-agent log
00001085 752.06768799 [19448] [agent-gui] Windows - CurrentMajorVersionNumber: 10, CurrentBuild: 22000
00001086 752.06799316 [19448] [agent-gui] {{true true false windows \\.\pipe\openssh-ssh-agent 0 C:\Users\krzys\AppData\Local\gnupg\agent-gui 1m0s {300ms Windows Security Credential Dialog Xaml Host} {2850 []}} {C:\Program Files (x86)\gnupg C:\Users\krzys\AppData\Roaming\gnupg C:\Users\krzys\AppData\Local\gnupg false []}}+
00001087 753.35260010 [19448] [agent-gui] Serving ssh-agent cygwin socket on C:\Users\krzys\AppData\Local\gnupg\agent-gui\S.gpg-agent.ssh.cyg:50592 with nonce: b3285380-e382834d-bb655e6b-a756a272)
00001088 753.35266113 [19448] [agent-gui] Serving ssh-agent named pipe on \\.\pipe\openssh-ssh-agent
00001089 753.35308838 [19448] [agent-gui] Serving ssh-agent socket on C:\Users\krzys\AppData\Local\gnupg\agent-gui\S.gpg-agent.ssh
00001090 753.35327148 [19448] [agent-gui] Serving gpg-agent socket on C:\Users\krzys\AppData\Local\gnupg\agent-gui\S.gpg-agent
00001091 753.35345459 [19448] [agent-gui] Serving gpg-agent extra socket on C:\Users\krzys\AppData\Local\gnupg\agent-gui\S.gpg-agent.extra
00001092 753.35351563 [19448] [agent-gui] Set 'SSH_AUTH_SOCK=\\.\pipe\openssh-ssh-agent'
00001093 753.35766602 [19448] [agent-gui] Broadcasting environment change. From 2021-11-19 13:10:58.111821 +0100 CET m=+1.289776601
00001094 753.47772217 [19448] [agent-gui] Broadcasting environment change. To 2021-11-19 13:10:58.2351918 +0100 CET m=+1.413147401, Elapsed 123.3708ms
00001095 753.47778320 [19448] [agent-gui] Set 'WSL_GNUPG_HOME=C:\Users\krzys\AppData\Roaming\gnupg'
00001096 753.47778320 [19448] [agent-gui] Was 'WSLENV='
00001097 753.47784424 [19448] [agent-gui] Set 'WSLENV=WSL_GNUPG_HOME/up'
00001098 753.47790527 [19448] [agent-gui] Broadcasting environment change. From 2021-11-19 13:10:58.2361913 +0100 CET m=+1.414146901
00001099 753.57812500 [19448] [agent-gui] Broadcasting environment change. To 2021-11-19 13:10:58.3356621 +0100 CET m=+1.513617701, Elapsed 99.4708ms
00001100 753.57818604 [19448] [agent-gui] Set 'WIN_GNUPG_HOME=C:/Users/krzys/AppData/Roaming/gnupg'
00001101 753.57824707 [19448] [agent-gui] Was 'WSLENV=WSL_GNUPG_HOME/up'
00001102 753.57830811 [19448] [agent-gui] Set 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u'
00001103 753.57830811 [19448] [agent-gui] Broadcasting environment change. From 2021-11-19 13:10:58.3366235 +0100 CET m=+1.514579101
00001104 753.67846680 [19448] [agent-gui] Broadcasting environment change. To 2021-11-19 13:10:58.4360889 +0100 CET m=+1.614044501, Elapsed 99.4654ms
00001105 753.67852783 [19448] [agent-gui] Set 'WSL_GNUPG_SOCKETS=C:\Users\krzys\AppData\Local\gnupg'
00001106 753.67858887 [19448] [agent-gui] Was 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u'
00001107 753.67864990 [19448] [agent-gui] Set 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u:WSL_GNUPG_SOCKETS/up'
00001108 753.67871094 [19448] [agent-gui] Broadcasting environment change. From 2021-11-19 13:10:58.4369774 +0100 CET m=+1.614933001
00001109 753.77917480 [19448] [agent-gui] Broadcasting environment change. To 2021-11-19 13:10:58.5374606 +0100 CET m=+1.715416201, Elapsed 100.4832ms
00001110 753.77929688 [19448] [agent-gui] Set 'WIN_GNUPG_SOCKETS=C:/Users/krzys/AppData/Local/gnupg'
00001111 753.77929688 [19448] [agent-gui] Was 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u:WSL_GNUPG_SOCKETS/up'
00001112 753.78076172 [19448] [agent-gui] Set 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u:WSL_GNUPG_SOCKETS/up:WIN_GNUPG_SOCKETS/u'
00001113 753.78076172 [19448] [agent-gui] Broadcasting environment change. From 2021-11-19 13:10:58.5376808 +0100 CET m=+1.715636401
00001114 753.97967529 [19448] [agent-gui] Broadcasting environment change. To 2021-11-19 13:10:58.7374468 +0100 CET m=+1.915402401, Elapsed 199.766ms
00001115 753.97967529 [19448] [agent-gui] Set 'WSL_AGENT_HOME=C:\Users\krzys\AppData\Local\gnupg\agent-gui'
00001116 753.97973633 [19448] [agent-gui] Was 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u:WSL_GNUPG_SOCKETS/up:WIN_GNUPG_SOCKETS/u'
00001117 753.97979736 [19448] [agent-gui] Set 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u:WSL_GNUPG_SOCKETS/up:WIN_GNUPG_SOCKETS/u:WSL_AGENT_HOME/up'
00001118 753.97985840 [19448] [agent-gui] Broadcasting environment change. From 2021-11-19 13:10:58.7381115 +0100 CET m=+1.916067101
00001119 754.08020020 [19448] [agent-gui] Broadcasting environment change. To 2021-11-19 13:10:58.8384361 +0100 CET m=+2.016391701, Elapsed 100.3246ms
00001120 754.08026123 [19448] [agent-gui] Set 'WIN_AGENT_HOME=C:/Users/krzys/AppData/Local/gnupg/agent-gui'
00001121 754.08026123 [19448] [agent-gui] Was 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u:WSL_GNUPG_SOCKETS/up:WIN_GNUPG_SOCKETS/u:WSL_AGENT_HOME/up'
00001122 754.08032227 [19448] [agent-gui] Set 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u:WSL_GNUPG_SOCKETS/up:WIN_GNUPG_SOCKETS/u:WSL_AGENT_HOME/up:WIN_AGENT_HOME/u'
00001123 754.08038330 [19448] [agent-gui] Broadcasting environment change. From 2021-11-19 13:10:58.8386578 +0100 CET m=+2.016613401
00001124 754.18176270 [19448] [agent-gui] Broadcasting environment change. To 2021-11-19 13:10:58.9398625 +0100 CET m=+2.117818101, Elapsed 101.2047ms
00001125 754.18176270 [19448] [agent-gui] Executing: C:\Program Files (x86)\gnupg\bin\gpg-agent.exe --homedir C:\Users\krzys\AppData\Roaming\gnupg --ssh-fingerprint-digest SHA256 --use-standard-socket --enable-ssh-support --enable-putty-support --daemon --pinentry-program C:\Users\krzys\win-gpg-agent\pinentry.exe
00001126 759.19708252 [19448] [agent-gui] Forcefully killing gpg-agent
00001127 759.19732666 [19448] [agent-gui] Del 'WIN_AGENT_HOME'
00001128 759.19750977 [19448] [agent-gui] Was 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u:WSL_GNUPG_SOCKETS/up:WIN_GNUPG_SOCKETS/u:WSL_AGENT_HOME/up:WIN_AGENT_HOME/u'
00001129 759.19763184 [19448] [agent-gui] Set 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u:WSL_GNUPG_SOCKETS/up:WIN_GNUPG_SOCKETS/u:WSL_AGENT_HOME/up'
00001130 759.19763184 [19448] [agent-gui] Broadcasting environment change. From 2021-11-19 13:11:03.9555287 +0100 CET m=+7.133484301
00001131 759.30462646 [19448] [agent-gui] Broadcasting environment change. To 2021-11-19 13:11:04.0621531 +0100 CET m=+7.240108701, Elapsed 106.6244ms
00001132 759.30468750 [19448] [agent-gui] Del 'WSL_AGENT_HOME'
00001133 759.30474854 [19448] [agent-gui] Was 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u:WSL_GNUPG_SOCKETS/up:WIN_GNUPG_SOCKETS/u:WSL_AGENT_HOME/up'
00001134 759.30480957 [19448] [agent-gui] Set 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u:WSL_GNUPG_SOCKETS/up:WIN_GNUPG_SOCKETS/u'
00001135 759.30480957 [19448] [agent-gui] Broadcasting environment change. From 2021-11-19 13:11:04.0631305 +0100 CET m=+7.241086101
00001136 759.40307617 [19448] [agent-gui] Broadcasting environment change. To 2021-11-19 13:11:04.1611864 +0100 CET m=+7.339142001, Elapsed 98.0559ms
00001137 759.40313721 [19448] [agent-gui] Del 'WIN_GNUPG_SOCKETS'
00001138 759.40313721 [19448] [agent-gui] Was 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u:WSL_GNUPG_SOCKETS/up:WIN_GNUPG_SOCKETS/u'
00001139 759.40313721 [19448] [agent-gui] Set 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u:WSL_GNUPG_SOCKETS/up'
00001140 759.40313721 [19448] [agent-gui] Broadcasting environment change. From 2021-11-19 13:11:04.1611864 +0100 CET m=+7.339142001
00001141 759.50366211 [19448] [agent-gui] Broadcasting environment change. To 2021-11-19 13:11:04.2611867 +0100 CET m=+7.439142301, Elapsed 100.0003ms
00001142 759.50372314 [19448] [agent-gui] Del 'WSL_GNUPG_SOCKETS'
00001143 759.50372314 [19448] [agent-gui] Was 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u:WSL_GNUPG_SOCKETS/up'
00001144 759.50378418 [19448] [agent-gui] Set 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u'
00001145 759.50378418 [19448] [agent-gui] Broadcasting environment change. From 2021-11-19 13:11:04.2621423 +0100 CET m=+7.440097901
00001146 759.60455322 [19448] [agent-gui] Broadcasting environment change. To 2021-11-19 13:11:04.3627312 +0100 CET m=+7.540686801, Elapsed 100.5889ms
00001147 759.60455322 [19448] [agent-gui] Del 'WIN_GNUPG_HOME'
00001148 759.60455322 [19448] [agent-gui] Was 'WSLENV=WSL_GNUPG_HOME/up:WIN_GNUPG_HOME/u'
00001149 759.60461426 [19448] [agent-gui] Set 'WSLENV=WSL_GNUPG_HOME/up'
00001150 759.60461426 [19448] [agent-gui] Broadcasting environment change. From 2021-11-19 13:11:04.3629876 +0100 CET m=+7.540943201
00001151 759.70513916 [19448] [agent-gui] Broadcasting environment change. To 2021-11-19 13:11:04.4633585 +0100 CET m=+7.641314101, Elapsed 100.3709ms
00001152 759.70520020 [19448] [agent-gui] Del 'WSL_GNUPG_HOME'
00001153 759.70520020 [19448] [agent-gui] Was 'WSLENV=WSL_GNUPG_HOME/up'
00001154 759.70526123 [19448] [agent-gui] Del 'WSLENV'
00001155 759.70526123 [19448] [agent-gui] Broadcasting environment change. From 2021-11-19 13:11:04.4636147 +0100 CET m=+7.641570301
00001156 759.80523682 [19448] [agent-gui] Broadcasting environment change. To 2021-11-19 13:11:04.5636465 +0100 CET m=+7.741602101, Elapsed 100.0318ms
00001157 759.80535889 [19448] [agent-gui] Del 'SSH_AUTH_SOCK'
00001158 759.80535889 [19448] [agent-gui] Broadcasting environment change. From 2021-11-19 13:11:04.5637354 +0100 CET m=+7.741691001
00001159 759.90563965 [19448] [agent-gui] Broadcasting environment change. To 2021-11-19 13:11:04.6631687 +0100 CET m=+7.841124301, Elapsed 99.4333ms
00001160 759.90612793 [19448] [agent-gui] Error closing connector for gpg-agent extra socket: remove C:\Users\krzys\AppData\Local\gnupg\agent-gui\S.gpg-agent.extra: The system cannot find the file specified.
00001161 759.90643311 [19448] [agent-gui] Error closing connector for gpg-agent socket: remove C:\Users\krzys\AppData\Local\gnupg\agent-gui\S.gpg-agent: The system cannot find the file specified.
00001162 759.90673828 [19448] [agent-gui] Error closing connector for ssh-agent socket: remove C:\Users\krzys\AppData\Local\gnupg\agent-gui\S.gpg-agent.ssh: The system cannot find the file specified.
00001163 759.90704346 [19448] [agent-gui] unable to access socket: C:\Users\krzys\AppData\Local\gnupg\S.gpg-agent
gpg-agent log (I couldn't figure out how to switch it to English, but the paths are the only part that seems relevant)
2021-11-19 13:10:58 gpg-agent[1484] nasłuchiwanie na gnieździe ,,C:\Users\krzys\AppData\Roaming\gnupg\S.gpg-agent''
2021-11-19 13:10:58 gpg-agent[1484] nasłuchiwanie na gnieździe ,,C:\Users\krzys\AppData\Roaming\gnupg\S.gpg-agent.extra''
2021-11-19 13:10:58 gpg-agent[1484] nasłuchiwanie na gnieździe ,,C:\Users\krzys\AppData\Roaming\gnupg\S.gpg-agent.browser''
2021-11-19 13:10:58 gpg-agent[1484] nasłuchiwanie na gnieździe ,,C:\Users\krzys\AppData\Roaming\gnupg\S.gpg-agent.ssh''
2021-11-19 13:10:58 gpg-agent[1484] gpg-agent (GnuPG) 2.2.28 started
2021-11-19 13:10:58 gpg-agent[1484] putty message loop thread started
2021-11-19 13:11:02 gpg-agent[1484] DBG: agent_cache_housekeeping