-
Notifications
You must be signed in to change notification settings - Fork 2.6k
gpg: can't connect to the agent: Invalid value passed to IPC #3857
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
also the |
These error messages seem to come from GPG, so I'd argue it's installed. It does sound like you're not running the GPG agent (or at least not the version gpg expects), though. This might be related to #2445.
Why would that exist? It certainly isn't related to Git for Windows. |
Have you seen whats in issue #2445? There is literally no answer there.
|
That's exactly why I closed it.
I don't think so, as "Invalid value passed to IPC" is a distinctly different error than "IPC connect call failed". Just so we're talking about the same thing, do you see the same gpg version? $ gpg --version
gpg (GnuPG) 2.2.29-unknown
libgcrypt 1.9.3-unknown
Copyright (C) 2021 Free Software Foundation, Inc.
License GNU GPL-3.0-or-later <https://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Home: /c/Users/me/.gnupg
Supported algorithms:
Pubkey: RSA, ELG, DSA, ECDH, ECDSA, EDDSA
Cipher: IDEA, 3DES, CAST5, BLOWFISH, AES, AES192, AES256, TWOFISH,
CAMELLIA128, CAMELLIA192, CAMELLIA256
Hash: SHA1, RIPEMD160, SHA256, SHA384, SHA512, SHA224
Compression: Uncompressed, ZIP, ZLIB, BZIP2 We did have a problem recently where If that's not it, and if you really use the same |
I literally wrote that in beginning, that my gpg doesnt work! I cant run it. It says that command is invalid or not existing. Writing |
Right. My bad. I went looking through the older GPG related issues and saw that one with the IPC error message and thought it was the same error message, but didn't actually compare them closely. Sorry. |
Do you know whats the issue that happens to me @dscho? |
Could you check the output of |
returned nothing
here it is:
|
sorry if gpg version didnt show, i edit the comment, now it shows. |
Try running the |
I get back this: 07:24:17.902053 exec-cmd.c:237 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin
07:24:17.917681 git.c:459 trace: built-in: git commit -m 'Updates'\!''
07:24:17.964562 run-command.c:654 trace: run_command: gpg -bsau ED44E0EAA7BBF26B
gpg: can't connect to the agent: Invalid value passed to IPC
gpg: keydb_search failed: No agent running
gpg: skipped "ED44E0EAA7BBF26B": No agent running
gpg: signing failed: No agent running
error: gpg failed to sign the data
fatal: failed to write commit object |
There is a Stack Overflow page where a person used Here is the output for you guys to chew on:
as i understand, gpg-connect-agent doesnt run gpg-agent when it should. Again, i tried reinstalling git, but as you can see, it doesnt really fix the issue... |
even running |
I could imagine that there is another You probably want to increase the debug level of gnupg via the |
Can you give what to add, im not common with gpgs config way... |
@dscho!!’ |
Also about debug level options, I said, I can’t access gpg just by writing |
I know as much about that as you do, and I would have to read the manual, too. So why don't you cut me out as go-between and read the manual right away? |
Thats okay, but you still didnt answer me, why wasnt gpg set in my environment variables by default by git installer...? |
i was running around in google and found this page: https://lists.gnupg.org/pipermail/gnupg-users/2012-April/044112.html. It says to use Opening the file in vim really does give message that it doesnt have permission to show it.....how can i give gpg access to |
they also mentioned to run Can't use ":"? But how can i access C: drive then? i think it is a bug, cause it never was an issue before.... |
so the problem is either with accesing the file, or the path where ":" can't be used. |
|
And may i ask you, how can i do that? Dont say to me to use Google, cause i did. |
@rimrul...? |
You will want to study carefully the full output to find out where that colon comes from. Git for Windows' copy of |
Okay, guys i found the problem and it is some why with enviroment variables! I'm using windows, so i can easily change those variables...the problem was that the GNUPGHOME variable was set to But still, why did git installer set the variable to |
The Git for Windows installer does not set that environment variable. |
Could we patch gpg to recognize that that variable is always supposed to contain a path and apply Msys2 windows to posix path conversion to it on startup? |
You mean like what we did for |
Similar to that, but I thought we might be able to call the conversio directly from GPG.
If we do the conversion in Msys2 we'd indeed have to convert it back when calling native executables, like we do with |
Looking at the linked patch, it seems like it converts the variable in both directions, so I think the same would work for |
Could you try that? The GitHub workflow of |
Yes, but I probably wont get to it today. |
Setup
defaults?
to the issue you're seeing?
nope
Details
Powershell on Windows Terminal
Minimal, Complete, and Verifiable example
this will help us understand the issue.
It supposed to run commit the update, but also sign it with GPG, so it will open up a new window where i write my password to accept the commit, and thats all.
Instead, it tried to open a window but it closed, and after some waiting i get this output:
Another strange thing happening, is that running
gpg
gives out that the command isnt valid or doesnt exist. I tried reinstalling git, but some why, it didn't install gpg together with git. I found out that gpg lies inC:\Program Files\Git\usr\bin
folder, but even setting it to environment variables, it wont run....URL to that repository to help us with testing?
It did happen on all repos.
The text was updated successfully, but these errors were encountered: