Closed mirror-kt closed 2 years ago
Same issue here. I've reverted back to 2.3.1 and held gpg update as a temporary workaround.
Was having the same issue and managed to fix it by manually creating the directory gnupg
at the root of the install: mkdir "$env:SCOOP\apps\gpg\current\gnupg"
There may be a better solution for actually fixing the manifest, but I decided to try this after doing a bit of research and noticing that the output from gpgconf --list-dirs
contained several references to that location, the important ones being the socket paths.
For some reason, gpg is refusing to respect the GNUPGHOME
environment variable. gpg --version
shows its set to ~\scoop\apps\gpg\current\home
but it's looking for the socket in ~\scoop\apps\gpg\current\gnupg\S.gpg-agent
. It seems like it's treating ~\scoop\apps\gpg\current\gnupg
as the home directory despite what gpg --version
shows. The notable thing I discovered is that ~\scoop\apps\gpg\current\home
is a junction to ~\scoop\persist\gpg\home
. If --homedir
is used to specify the home dir in the persist directory, the agent actually finds the socket. This isn't a solution in practice since I cannot specify it when I need to use gpg through git. GNUPGHOME
should be the way to do that, but it unfortunately doesn't work.
https://dev.gnupg.org/T5537 is a suspicious changed introduced with 2.3.2, but I'll need to investigate further. It's not yet clear if this is a bug with gpg or the manifest just needs to be changed to comply with a recent change.
The reason GNUPGHOME
isn't respected is that this is the portable version of gpg. This is determined by the presence of a gpgconf.ctl
file next to gpgconf.exe
. Therefore, unless --homedir
is specified, it will always use the default location, which is a directory named home
relative to the installation directory. This can be seen in standard_homedir()
2.3.1 socket dir used gnupg_homedir()
for Windows as seen here. gnupg_homedir()
calls default_homedir()
which calls standard_homedir()
for portable apps on Windows. In short, on 2.3.1 the socket directory was the home
directory in the installation directory.
2.3.2 had a change to the socket dir behaviour on Windows. As seen here, it now uses the gnupg
directory relative to the installation root rather than a directory named home
. I feel like this is a bug; it should've been "home"
. What likely happened is that the author mistakenly thought gnupg
was the name of the home dir, since that's the default for non-portable versions.
Whether it's intended behaviour or not, I think simply making a directory named gnupg
is the way to address this. I was going to suggest making it a junction to the home directory, but I'm not sure if it's worth the hassle.
changing persist to ["home", ["home", "gnupg"]]
in scoop manifest might be a workaround while upstream behavior doesn't fix?
any news?
and how to install old version ? I've tried
scoop install gpg@2.2.32
for install lts, but I got
Searching hash for gnupg-w32-2.2.32_$matchDate.exe in https://www.gnupg.org/download/integrity_check.html
Could not find hash in https://www.gnupg.org/download/integrity_check.html
Downloading gnupg-w32-2.2.32_$matchDate.exe to compute hashes!
The remote server returned an error: (404) Not Found.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Any news?
I don't know why, but gpg@2.3.1 works.
Try scoop install gpg@2.3.1
as a temporal solution.
I don't know why, but gpg@2.3.1 works.
Try
scoop install gpg@2.3.1
as a temporal solution.
Doesn't work for me ;(
C:\Users\clumbo>scoop install gpg@2.3.1 WARN Given version (2.3.1) does not match manifest (2.3.3) WARN Attempting to generate manifest for 'gpg' (2.3.1) Autoupdating gpg Searching hash for gnupg-w32-2.3.1_$matchDate.exe in https://www.gnupg.org/download/integrity_check.html Could not find hash in https://www.gnupg.org/download/integrity_check.html Downloading gnupg-w32-2.3.1$matchDate.exe to compute hashes! The remote server returned an error: (404) Not Found. URL https://www.gnupg.org/ftp/gcrypt/binary/gnupg-w32-2.3.1$matchDate.exe#/dl.7z is not valid Could not find hash! Could not install gpg@2.3.1
Doesn't work for me ;(
You could try installing the old version like this:
scoop install https://raw.githubusercontent.com/ScoopInstaller/Main/15d3b247156bae77eb227649ec35746719d1f2ea/bucket/gpg.json
scoop hold gpg
Seems to work fine on my end.
Did anyone figure out what was the actual issue?
After updating gpg to 2.3.2, when I try to use gpg, I get an error saying that gpg-agent is not running. The commands and errors I tried are as follows
When we tried installing the same version of gpg without scoop, the command worked fine, so there seems to be a problem with the installation method using scoop.