Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

gpg: can't connect to the agent: IPC connect call failed

Tags:

gnupg

I am having a problem while trying to decrypt some keys using GPG. The following output is given to me:

gpg: can't connect to the agent: IPC connect call failed 

I already edited some files, pointed in this tutorial: https://michaelheap.com/gpg-cant-connect-to-the-agent-ipc-connect-call-failed/ but with no success.

Possible reasons for that?

Thanks in advance

like image 570
Johann Gomes Avatar asked Oct 10 '17 18:10

Johann Gomes


People also ask

What is gpg connect agent?

The gpg-connect-agent is a utility to communicate with a running gpg-agent . It is useful to check out the commands gpg-agent provides using the Assuan interface. It might also be useful for scripting simple applications. Input is expected at stdin and output gets printed to stdout.

How do I open a gpg agent in Windows?

Start the agent on startup The most simple solution is to create a shortcut of C:\Program Files (x86)\GnuPG\bin\gpg-connect-agent.exe inside of C:\Users\USER\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup .


2 Answers

Even I had the above issue in Ubuntu 20 WSL, I tried all the below | above suggestions, but none worked for me.

root@7400-9888K13:/mnt/c/Users/PKammari# wget -q -O - https://packages.cloudfoundry.org/debian/cli.cloudfoundry.org.key | sudo apt-key add - gpg: can't connect to the agent: IPC connect call failed 

What did I do to resolve the issue?

  • remove gpg
  • install other version of gpg.

How do I do it?
apt remove gpg ( follow the instructions)
apt install gnupg1 (follow the instructions)

Option 2. sudo apt update --y

`sudo apt remove gpg`  `sudo apt-get update -y`  `sudo apt-get install -y gnupg1`  

Proof. (refer to the screenshot):
enter image description here

like image 118
preetam singh Avatar answered Sep 21 '22 09:09

preetam singh


There is probably already a gpg-agent running on the system, which your gpg command is unable to connect to.

If you do a pkill -9 gpg-agent and then source <(gpg-agent --daemon) to restart the agent, you should be able to connect to the pinentry-curses for inputting your password.

like image 35
sam Avatar answered Sep 20 '22 09:09

sam