Mailing List Archive

Can not import private key (Not enough space)
Hi,

I've encountered an issue while trying to import a private key into GnuPG,
resulting in an unexpected error message. Below are the details including
the version of GnuPG and the error messages received:

c:\> gpg --version
gpg (GnuPG) 2.4.5
libgcrypt 1.10.3
...


c:\> gpg --import private-keys.asc
gpg: enabled compatibility flags:
[snipped]
gpg: key xxxxxxxxxxxxxxxxxxxxxxx: error sending to agent: Not enough space
gpg: error reading 'private-keys.asc': Not enough space
gpg: import from 'private-keys.asc' failed: Not enough space
gpg: Total number processed: 0
gpg: unchanged: 1
gpg: secret keys read: 1


Interestingly, my disk has ample space available, so this error seems to be
misleading. Furthermore, when attempting to import the same file on an
older GnuPG installation, the import is successful:

c:\> gpg --version
gpg (GnuPG) 2.2.15
libgcrypt 1.8.4
...


c:\> gpg --import private-keys.asc
[snipped]
gpg: Total number processed: 2
gpg: unchanged: 2
gpg: secret keys read: 2
gpg: secret keys unchanged: 2


Could you please provide any advice on this matter?

Thank you in advance for your assistance.

Best regards,

--
M.
Re: Can not import private key (Not enough space) [ In reply to ]
Hi!

On Mon, 8 Apr 2024 02:38, Moses said:

> gpg: key xxxxxxxxxxxxxxxxxxxxxxx: error sending to agent: Not enough space

That is a ENOMEM which is commonly returned for a failed malloc call.
Could happen at a lot of places.

Try:

gpg-connect-agent -v

and tehre a command like "getinfo version" to check whether tehre is a
problem with the IPC connection.

gpgconf -L

also gives important information.

> c:\> gpg --version
> gpg (GnuPG) 2.2.15

That version is pretty old and in terms of IPC ("error sending to
agent") one idfference is that this version uses %APPDATA%\gnupg for the
socket files but modern versions use %LOCALAPPDATA%\gnupg.



Shalom-Salam,

Werner

--
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein
Re: Can not import private key (Not enough space) [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

I tried the command you gave and the results are as follows:

C:\> gpg-connect-agent -v
> getinfo version
D 2.4.5
OK
> gpgconf -L
ERR 67109139 Unknown IPC command <GPG Agent>

I downloaded and installed gpg4win from the official website, and the
signature/sha-256 of the installer matches.

Thanks

- --
M.






-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEtS81xZ6ggCm51urXjBWeIrrYv8gFAmYT14wACgkQjBWeIrrY
v8g/DRAAlgbnQ8wLj9vnJXfEpf9yh+uXRs0A6r6DV0/44ni/AzyqcRzCDKhbHXOO
dSdsA2RKmv+7QB9p3X1c/d09YmAF1qzgiA7zT2EQXKmPoMCJRLWTfeY3wlCqeldd
OCsXIZzE9rQifMn8YjvPe8A//Fc6Y+EomQpYP8qVBWISwpQ7eOdq6uLyLT/nid0O
66CjTdGyRwyni+PKKHNjDjvkJAKm+m5AGK3OEvxSnYWq0qgLNW6xizhZmzShU5lR
Jvbsz66H6VZM+I0kLLB63bdqwDJPy6KcfpOeT62K1U+pQ++mcLI3GpYw76mrnHL2
odTrZ5/yADX+zcKyqEiXLVGjZQMm/PrmNvKoZ0hC6svA3lfryOhgqdVmh6TME5x9
mLnDwawqacxy6Y2YJxUHnMbIPyAI+0L2Kd7GGoGHvjjWBqYsU//5DN3dmPw5W9+C
OfSyzYWgV3fBW29+rcW/mSZS4uZZuArFsYqbqU/mpTiG9rSeeVkEymcSjSH6PEdy
AUQQN4xQDhqQNY7IXLKzD6fh6/felEl5qU2PehKMMIjX5z6AQCldAwhbxVLbGOXj
DGnsXIqvoXMLt3LhJIers1aDnaWhs6ebC4dWcx3N+Pfsbo6rQEkTcgHDKHCo4dxd
fkBQs3xEahy2JMWNtxi34gcPcdVC2AbUnzO6erpM7hN8f5udSQM=
=soqR
-----END PGP SIGNATURE-----
Re: Can not import private key (Not enough space) [ In reply to ]
On Mon, 8 Apr 2024 11:42, Moses said:

> C:\> gpg-connect-agent -v
>> getinfo version
> D 2.4.5

Okay, that works.

>> gpgconf -L
> ERR 67109139 Unknown IPC command <GPG Agent>

Please enter this on the command line not at the gpg-connect-agent
prompt.


Salam-Shalom,

Werner

--
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein
Re: Can not import private key (Not enough space) [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Returns as follows:
(just blacked out the username...)

C:\>gpgconf -L
sysconfdir:C%3a\ProgramData\GNU\etc\gnupg
bindir:D%3a\software\GNU\Gpg4win\..\GnuPG\bin
libexecdir:D%3a\software\GNU\Gpg4win\..\GnuPG\bin
libdir:D%3a\software\GNU\Gpg4win\..\GnuPG\lib\gnupg
datadir:D%3a\software\GNU\Gpg4win\..\GnuPG\share\gnupg
localedir:D%3a\software\GNU\Gpg4win\..\GnuPG\share\locale
socketdir:C%3a\Users\?????\AppData\Local\gnupg
dirmngr-socket:C%3a\Users\?????\AppData\Local\gnupg\S.dirmngr
keyboxd-socket:C%3a\Users\?????\AppData\Local\gnupg\S.keyboxd
agent-ssh-socket:C%3a\Users\?????\AppData\Local\gnupg\S.gpg-agent.ssh
agent-extra-socket:C%3a\Users\?????\AppData\Local\gnupg\S.gpg-agent.extra
agent-browser-socket:C%3a\Users\?????\AppData\Local\gnupg\S.gpg-agent.browser
agent-socket:C%3a\Users\?????\AppData\Local\gnupg\S.gpg-agent
homedir:C%3a\Users\?????\AppData\Roaming\gnupg




On Tue, Apr 9, 2024 at 10:05?AM Werner Koch <wk@gnupg.org> wrote:
>
> On Mon, 8 Apr 2024 11:42, Moses said:
>
> > C:\> gpg-connect-agent -v
> >> getinfo version
> > D 2.4.5
>
> Okay, that works.
>
> >> gpgconf -L
> > ERR 67109139 Unknown IPC command <GPG Agent>
>
> Please enter this on the command line not at the gpg-connect-agent
> prompt.
>
>
> Salam-Shalom,
>
> Werner
>
> --
> The pioneers of a warless world are the youth that
> refuse military service. - A. Einstein
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEtS81xZ6ggCm51urXjBWeIrrYv8gFAmYVMnsACgkQjBWeIrrY
v8hGFRAAq2Y7Rzahrz3nBKoLkO29rzKMpurp0XXhOk0ONPXcJGKCLDq6UvDa1VmH
yowbbY87lOSucAKjyekrr1qr0as7p76/rRQPQeorXjQF/GeEFTUEzolRWJk70M3C
+Wcxi9WbNV/VmZsnJUjpsG4FKyqgBqhKdildPm1CvTF4mmF+X5cOK1swi3GoWf3I
LGF9zJ+Gbm5Shs65htJ9xCSryCYEHciZHev5zMt6yQM1ZBBjKbkOC2OLRoFSBCej
CDHcmY4tA6a//De4jUyv3ypoxBv4bPOLOgvDzRVne62hhOwAQqtFF8ZgX+McS4cs
Zw+xJycPZVDegFvlQW2qwhtJWYfUXCGpxlrsi/1zoOgHp1uaR8O/8x8gszBuiXKj
kuLIojRZWRnt1lYItO3oUO6t/z95HfNUE1aT4hKcGuDx/yK4/1h4i9VFb48W0qAu
WoWuiON8Q36SsLA2C6cuPfpjx5gusX31iiuMoNH5IoujN6Ip4al9v0Goo76CSe7l
Sqy4iLmAh3DhTt2prw70k93GAMD3oORT/AGk1SyxDoRzRmV99BELdr4ZGFyJnhqW
wvBjxtl0ynRg7UOKilug+tZbTRSlAqNMeBAKLn90aSsmy8f/MZuPvyDnhowpoL/a
7jpZaLlTvKvzi++Yd5MHvyX97rOrzIndsVyC1Qr1yN+EuQa1ubI=
=3+BK
-----END PGP SIGNATURE-----

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Can not import private key (Not enough space) [ In reply to ]
Hi!

On Tue, 9 Apr 2024 12:21, Moses said:
> C:\>gpgconf -L

which merely shows that you installed the software on d:\software and
kep the user data at the usual C: directories. I see nothing strange.

To recap your problem was:

c:\> gpg --import private-keys.asc
gpg: enabled compatibility flags:
[snipped]
gpg: key xxxxxxxxxxxxxxxxxxxxxxx: error sending to agent: Not enough space

I don't known why you get that error which might hint at a out of memory
(not out of disk space) problem. We could look at the output of

gpgconf -V

and

gpgconf -X

but I doubt that this will show anything useful for your case. Can you
start kleopatra? If so, what does its selftest tell?

What you can do is:

gpgconf -K all

to stop all background processes (or use the taskmgr or logout and in
again).

cd %APPDATA%
ren gnupg gnupg.save
cd %LOCALAPPDATA%
ren gnupg gnupg.save

and then try agin. If this does work you might have insufficent
permissions somewhere below %APPDATA%\gnupg . If kleopatra starts you
can also teh DbgViewer tool from Sysinternals to see the diagnostics
from Kleopatra.


Shalom-Salam,

Werner

--
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein
Re: Can not import private key (Not enough space) [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

Thank you for your continued follow-up. I executed commands. Here are
the results:

C:\>gpgconf -V
* GnuPG 2.4.5 (cbff323b3)
MingW32
Windows 10.0 build 19045

* Libgcrypt 1.10.3 (aa161086)
version:1.10.3:10a03:1.48:13000:
cc:100000:gcc:10-win32 20210110:
ciphers:arcfour:blowfish:cast5:des:aes:twofish:serpent:rfc2268:seed:camellia:idea:salsa20:gost28147:chacha20:sm4:
pubkeys:dsa:elgamal:rsa:ecc:
digests:crc:gostr3411-94::md4:md5:rmd160:sha1:sha256:sha512:sha3:tiger:whirlpool:stribog:blake2:sm3:
rnd-mod:w32:
cpu-arch:x86:
mpi-asm:i386/mpih-add1.S:i386/mpih-sub1.S:i386/mpih-mul1.S:i386/mpih-mul2.S:i386/mpih-mul3.S:i386/mpih-lshift.S:i386/mpih-rshift.S:
hwflist:intel-cpu:intel-bmi2:intel-ssse3:intel-sse4.1:intel-pclmul:intel-aesni:intel-rdrand:intel-avx:intel-avx2:intel-fast-vpgather:intel-rdtsc:
fips-mode:n:::
rng-type:standard:1:3030000:1:
compliance:::

* GpgRT 1.48 (77b7c5f)

* Libassuan 2.5.7 (cc2f776)

* KSBA 1.6.6 (3a43822)

* NTBTLS 0.3.2 (2c38007)


C:\>gpgconf -X
### Dump of all standard config files
### GnuPG 2.4.5 (cbff323b3)
### MingW32
### [VERSION file not found]
### Windows 10.0 build 19045
### Libgcrypt 1.10.3
### GpgRT 1.48
### Codepages: 65001 936 936
###

sysconfdir:C%3a\ProgramData\GNU\etc\gnupg
bindir:D%3a\software\GNU\Gpg4win\..\GnuPG\bin
libexecdir:D%3a\software\GNU\Gpg4win\..\GnuPG\bin
libdir:D%3a\software\GNU\Gpg4win\..\GnuPG\lib\gnupg
datadir:D%3a\software\GNU\Gpg4win\..\GnuPG\share\gnupg
localedir:D%3a\software\GNU\Gpg4win\..\GnuPG\share\locale
socketdir:C%3a\Users\???\AppData\Local\gnupg
dirmngr-socket:C%3a\Users\???\AppData\Local\gnupg\S.dirmngr
keyboxd-socket:C%3a\Users\???\AppData\Local\gnupg\S.keyboxd
agent-ssh-socket:C%3a\Users\???\AppData\Local\gnupg\S.gpg-agent.ssh
agent-extra-socket:C%3a\Users\???\AppData\Local\gnupg\S.gpg-agent.extra
agent-browser-socket:C%3a\Users\???\AppData\Local\gnupg\S.gpg-agent.browser
agent-socket:C%3a\Users\???\AppData\Local\gnupg\S.gpg-agent
homedir:C%3a\Users\???\AppData\Roaming\gnupg

PATH=D:\software\VMware\bin\;C:\Program Files\Common
Files\Oracle\Java\javapath;C:\Program
Files\Microsoft\jdk-11.0.12.7-hotspot\bin;C:\Program Files
(x86)\Common Files\Intel\Shared
Libraries\redist\intel64\compiler;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;C:\Program
Files\dotnet\;C:\Program Files\Microsoft SQL
Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client
SDK\ODBC\170\Tools\Binn\;D:\software\GNU\GnuWin32\bin;D:\software\Git\cmd;D:\software\Python\Python39\Scripts;D:\software\Python\Python39\;D:\software\emacs\bin;C:\Program
Files\Azure Data Studio\bin;C:\Program Files\Microsoft SQL
Server\150\Tools\Binn\;C:\Users\???\AppData\Local\Programs\Python\Python310\Scripts\;C:\Users\???\App;D:\software\Calibre\;C:\Program
Files (x86)\Microsoft SQL Server\160\DTS\Binn\;C:\Program Files
(x86)\cloudflared\.;D:\software\GNU\Gpg4win\..\GnuPG\bin;C:\Program
Files\WireGuard\;C:\Users\???\AppData\Local\Programs\Python\Python310\;C:\Users\???\AppData\Local\Microsoft\WindowsApps;C:\Users\???\.dotnet\tools;C:\Program
Files\Azure Data
Studio\bin;D:\software\Google\CloudSDK\google-cloud-sdk\bin

###
### global config "C:\ProgramData\GNU\etc\gnupg\common.conf": not installed
###
###
### local config "C:\Users\???\AppData\Roaming\gnupg\common.conf": not installed
###

###
### global config "C:\ProgramData\GNU\etc\gnupg\gpg-agent.conf": not installed
###
###
### local config "C:\Users\???\AppData\Roaming\gnupg\gpg-agent.conf"
###
- --8<---------------cut here---------------start------------->8---

###+++--- GPGConf ---+++###
verbose
verbose
debug-level guru
###log-file C:\Users\???\AppData\Roaming\gnupg\gpg-agent.log
###+++--- GPGConf ---+++### 03/08/24 12:14:59 Coordinated Universal Time
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.
- --8<---------------cut here---------------end--------------->8---

###
### global config "C:\ProgramData\GNU\etc\gnupg\scdaemon.conf": not installed
###
###
### local config "C:\Users\???\AppData\Roaming\gnupg\scdaemon.conf"
###
- --8<---------------cut here---------------start------------->8---

###+++--- GPGConf ---+++###
verbose
verbose
verbose
verbose
verbose
###+++--- GPGConf ---+++### 03/08/24 10:46:59 Coordinated Universal Time
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.
- --8<---------------cut here---------------end--------------->8---

###
### global config "C:\ProgramData\GNU\etc\gnupg\dirmngr.conf": not installed
###
###
### local config "C:\Users\???\AppData\Roaming\gnupg\dirmngr.conf"
###
- --8<---------------cut here---------------start------------->8---

###+++--- GPGConf ---+++###
#allow-version-check
allow-version-check
honor-http-proxy
keyserver hkps://keys.openpgp.org
verbose
verbose
debug-level advanced
###+++--- GPGConf ---+++### 03/08/24 12:15:00 Coordinated Universal Time
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.
- --8<---------------cut here---------------end--------------->8---

###
### global config "C:\ProgramData\GNU\etc\gnupg\gpg.conf": not installed
###
###
### local config "C:\Users\???\AppData\Roaming\gnupg\gpg.conf"
###
- --8<---------------cut here---------------start------------->8---

###+++--- GPGConf ---+++###
utf8-strings
auto-key-locate local
max-cert-depth 6
keyserver hkps://keys.openpgp.org
verbose
verbose
###+++--- GPGConf ---+++### 03/08/24 12:11:57 Coordinated Universal Time
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.
- --8<---------------cut here---------------end--------------->8---

###
### global config "C:\ProgramData\GNU\etc\gnupg\gpgsm.conf": not installed
###
###
### local config "C:\Users\???\AppData\Roaming\gnupg\gpgsm.conf"
###
- --8<---------------cut here---------------start------------->8---

###+++--- GPGConf ---+++###
verbose
verbose
verbose
verbose
verbose
auto-issuer-key-retrieve
###+++--- GPGConf ---+++### 03/08/24 12:14:59 Coordinated Universal Time
# GPGConf edited this configuration file.
# It will disable options before this marked block, but it will
# never change anything below these lines.
- --8<---------------cut here---------------end--------------->8---

###
### Registry entries:
###
###
### GnuPG Desktop related:
### HKLM\Software\Gpg4win:Install Directory
### ->D:\software\GNU\Gpg4win<-
###

C:\>gpgconf -K all

C:\>cd %APPDATA%

C:\Users\???\AppData\Roaming>ren gnupg gnupg.save

C:\Users\???\AppData\Roaming>cd %LOCALAPPDATA%

C:\Users\???\AppData\Local>ren gnupg gnupg.save

C:\Users\???\AppData\Local>cd \

C:\>gpg --import private-keys.asc
gpg: C:\\Users\\???\\AppData\\Roaming\\gnupg\\trustdb.gpg: trustdb created
gpg: key ??????????????????????????? imported
gpg: key ?????????: error sending to agent: Not enough space
gpg: error building skey array: Not enough space
gpg: error reading 'private-keys.asc': Not enough space
gpg: import from 'private-keys.asc' failed: Not enough space
gpg: Total number processed: 0
gpg: imported: 1
gpg: secret keys read: 1

C:\>

I'm executing on a workstation with 64GB of RAM. The Kleopatra can
start, self-test is all passed except "VS-NfD compliant", here is the
snapshot: https://i.postimg.cc/CLc1ny05/image.png

Also, maybe related, someone in the IRC channel guided me to enable
and check the log of gpg-agent, and here is the result,

2024-04-08 08:03:37 gpg-agent[27040] command 'KEYINFO' failed: System
error w/o errno
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc -> ERR
67125245 System error w/o errno <GPG Agent>
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
KEYWRAP_KEY --import
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc ->
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc -> OK
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
SETKEYDESC ?????????????????
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc -> OK
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
IMPORT_KEY --timestamp=20190920T043443
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc ->
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] command 'IMPORT_KEY' failed: File exists
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc -> ERR
67141667 File exists <GPG Agent>
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
SETKEYDESC ?????????????????
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc -> OK
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
IMPORT_KEY --timestamp=20190920T043443
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc ->
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <-
[[Confidential data not shown]]
2024-04-08 08:03:37 gpg-agent[27040] starting a new PIN Entry
2024-04-08 08:03:37 gpg-agent[27040] DBG: connection to PIN entry established
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc -> INQUIRE
PINENTRY_LAUNCHED 35184 qt 1.2.1 - - - - 0/0 -
2024-04-08 08:03:37 gpg-agent[27040] DBG: chan_0x000002cc <- END
2024-04-08 08:03:41 gpg-agent[27040] DBG: agent_cache_housekeeping
2024-04-08 08:03:45 gpg-agent[27040] DBG: agent_cache_housekeeping
2024-04-08 08:03:49 gpg-agent[27040] DBG: agent_cache_housekeeping
2024-04-08 08:03:51 gpg-agent[27040] DBG: rsa_testkey => Success
2024-04-08 08:03:51 gpg-agent[27040] command 'IMPORT_KEY' failed: Not
enough space
2024-04-08 08:03:51 gpg-agent[27040] DBG: chan_0x000002cc -> ERR
67141718 Not enough space <GPG Agent>
2024-04-08 08:03:51 gpg-agent[27040] DBG: chan_0x000002cc <- [eof]
2024-04-08 08:03:51 gpg-agent[27040] DBG: chan_0x0000014c -> RESTART
2024-04-08 08:03:51 gpg-agent[27040] DBG: chan_0x0000014c <- OK
2024-04-08 08:03:53 gpg-agent[27040] DBG: agent_cache_housekeeping
2024-04-08 08:03:57 gpg-agent[27040] DBG: agent_cache_housekeeping
2024-04-08 08:03:57 gpg-agent[27040] DBG: chan_0x00000324 -> OK
Pleased to meet you
2024-04-08 08:03:57 gpg-agent[27040] DBG: chan_0x00000324 <- GETINFO pid
2024-04-08 08:03:57 gpg-agent[27040] DBG: chan_0x00000324 -> D 27040
2024-04-08 08:03:57 gpg-agent[27040] DBG: chan_0x00000324 -> OK
2024-04-08 08:03:57 gpg-agent[27040] socket is still served by this server


- --
M.

On Tue, Apr 9, 2024 at 2:59?PM Werner Koch <wk@gnupg.org> wrote:
>
> Hi!
>
> On Tue, 9 Apr 2024 12:21, Moses said:
> > C:\>gpgconf -L
>
> which merely shows that you installed the software on d:\software and
> kep the user data at the usual C: directories. I see nothing strange.
>
> To recap your problem was:
>
> c:\> gpg --import private-keys.asc
> gpg: enabled compatibility flags:
> [snipped]
> gpg: key xxxxxxxxxxxxxxxxxxxxxxx: error sending to agent: Not enough space
>
> I don't known why you get that error which might hint at a out of memory
> (not out of disk space) problem. We could look at the output of
>
> gpgconf -V
>
> and
>
> gpgconf -X
>
> but I doubt that this will show anything useful for your case. Can you
> start kleopatra? If so, what does its selftest tell?
>
> What you can do is:
>
> gpgconf -K all
>
> to stop all background processes (or use the taskmgr or logout and in
> again).
>
> cd %APPDATA%
> ren gnupg gnupg.save
> cd %LOCALAPPDATA%
> ren gnupg gnupg.save
>
> and then try agin. If this does work you might have insufficent
> permissions somewhere below %APPDATA%\gnupg . If kleopatra starts you
> can also teh DbgViewer tool from Sysinternals to see the diagnostics
> from Kleopatra.
>
>
> Shalom-Salam,
>
> Werner
>
> --
> The pioneers of a warless world are the youth that
> refuse military service. - A. Einstein
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEtS81xZ6ggCm51urXjBWeIrrYv8gFAmYWJNwACgkQjBWeIrrY
v8gHFQ//bGLZ3F37lRZHrNYyuSZSOT6Epx3qBXa528QkxpaLTDp8PHFtIFTpsm9h
sHJNlXem45grhM/I4+LbVcniMp+plz+geW2MvFsrn6SO2QlJpsh3hTjS/hzVmU4Z
MUgkiRroQS+zWAK+msQewImg5LWmj5L2vk1VQ6HqlPPa04AOm2oXAF0+Qrb7skoV
qWcfAInyJihCSobE0HUFk60XNhXLr5RQ+udLDoA4wJA9yCZWZADN4pwxWXXDx9+e
VLybWmo6Is/doKTcmv9yLzr2XIRUnSwNikTqNAyBgIlnQFD03TbqEXazT1nOnKOi
nWZoRgY+Le6A2QJKMJTQ2mrvj1bf0HbSYuT6ZzS4aYUAQd6yLu8sYSLdoJQFA3F8
cTjV+AMPfJcwy9b1wutDxxLikv7vU3WLEQkqDP5pNT5UCz3Wb86M+pkCn0yIMDoH
dYOGTre0/61lUqIlp/2FLBJTskVoC/1AvRm0VjfJGb/foDuSITqigrcJiAtZt6uz
Ouy5N7N1cby3J2J6Eqf8F/g/zAU9r48E+wFTJXMpi1uVVxHqqJ5patUGrWzxje8X
MTGfly/C35DpcRyH4d2ORRiNBz2lYXFNjtbA3TLXNNfZ5RN5YWoWJfcflI/R7jMH
7g/ZEgo8NG0SWz5+uqMxC2wiY9ZM4Cid2r5vL6H288Pm88oC9nI=
=+qb0
-----END PGP SIGNATURE-----

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Can not import private key (Not enough space) [ In reply to ]
Hi,

I see in your PATH

D:\software\GNU\GnuWin32\bin

prior to

D:\software\GNU\Gpg4win\..\GnuPG\bin

May it be that you use a gpg version picked up from the GnuWin32? Check
also whether there is a gpg binary in the Git program directory.

My educated guess is that Gnuwin32 is a Cygwin based collection of
utilities which might also include gpg. Cygwin uses a slightly
different and incompatiple socket emulation which would explain the
error your get. As a workaround you may try to run

D:\software\GNU\GnuPG\bin\gpg --import foo

to use the correct gpg.


Shalom-Salam,

Werner


--
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein
Re: Can not import private key (Not enough space) [ In reply to ]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Hi,

I checked my D:\software\GNU\GnuWin32\bin. There is no gpg.exe in it,
only gpg-error.exe and gpg-error-config. But there is gpg.exe in my
git folder. I adjusted the PATH and temporarily removed it. Then I
tried to import again, and the same error still occurred. The same
error happened when I tried to directly execute the
D:\software\GNU\GnuPG\bin\gpg --import command.

- --
M.

On Wed, Apr 10, 2024 at 3:35?PM Werner Koch <wk@gnupg.org> wrote:
>
> Hi,
>
> I see in your PATH
>
> D:\software\GNU\GnuWin32\bin
>
> prior to
>
> D:\software\GNU\Gpg4win\..\GnuPG\bin
>
> May it be that you use a gpg version picked up from the GnuWin32? Check
> also whether there is a gpg binary in the Git program directory.
>
> My educated guess is that Gnuwin32 is a Cygwin based collection of
> utilities which might also include gpg. Cygwin uses a slightly
> different and incompatiple socket emulation which would explain the
> error your get. As a workaround you may try to run
>
> D:\software\GNU\GnuPG\bin\gpg --import foo
>
> to use the correct gpg.
>
>
> Shalom-Salam,
>
> Werner
>
>
> --
> The pioneers of a warless world are the youth that
> refuse military service. - A. Einstein
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEtS81xZ6ggCm51urXjBWeIrrYv8gFAmYX1lQACgkQjBWeIrrY
v8hC/xAAkRIsAYlONRBS2Rg30AMB4ghMbU3SKlJ6mNpOcXmdv4U547Ie9iV0F6vl
UkPIn1CTThzffMuRvkWkbB+hccZTWC/lzjEUnpub4cQXG/MWZqX/KZY2ujqHwqSz
RTwv9Nirxw01bP+t6R/BIct4ReIePoI7nyD06JhAOMR3iuE7FCFOg8vaYC7ooZHG
4CUbAptK7l04hPxpfJ5drfqNCeTy2Bh/mHmVADFu43lq9AW9vhcpOabo+8jcNtQn
4FYITjq/P16c1cnNL5CZdWHqGK/+7T4VyIFowGL6/HYRiQR+Nokr1XRLI6+aJ2HU
soRaHc0r2UFVie71jgvPfc+R0dekffW/OCir4Eye3o1KmLrCpHjFKKknYca0pOeA
R4IO1U8tSHzRru3w7GTX9A2V4ziAcrdzmFjBrCWjLSaJJc9FLZbKyXLG9F9nAvIQ
6s+mf3/RaR8AURaO9WLE32Cvi3K2i1vhnPkJgMcgWpvH3MZA8rcrEX0+tSSUuMes
3owKpgKVNmpMsKdtgJEd0HV1VRKk2UV5mUf+b1MAv7jxrH5nApBAJdxrrqrK1hXP
X7v5S/GSgK0gv1zl0MAeyJfgeqJKgDP4VZMl2O3z98Z8DW3stzWMqZv/PR+vZYPY
EExISfJxQxLQtMNVIXm8tkGVEg0kmtCQIkNEnMQJLce+nbnw6mQ=
=VoTO
-----END PGP SIGNATURE-----

_______________________________________________
Gnupg-users mailing list
Gnupg-users@gnupg.org
https://lists.gnupg.org/mailman/listinfo/gnupg-users
Re: Can not import private key (Not enough space) [ In reply to ]
On Thu, 11 Apr 2024 12:24, Moses said:
> tried to import again, and the same error still occurred. The same
> error happened when I tried to directly execute the
> D:\software\GNU\GnuPG\bin\gpg --import command.

Well, I have no more idea on how to debug this by mail :-(.

On Linux you would now use strace and on Windows we have the
sysinternals tools to trace the system calls. And there is printf
debugging - I would here start with libassuan (src/assuan-socket.c).


Salam-Shalom,

Werner

--
The pioneers of a warless world are the youth that
refuse military service. - A. Einstein