April 9, 2010

gpg: OpenPGP card not available: IPC write error

Category: Sysadmin.

If you reach this page searching the internet for this error and did not find anything usefull, it might be because the error you want to search is actually Unknown IPC command.

Basically, you may not have gpg-agent(1) running. The man page gives a few pointer on how to run it, here is my way to do so, in ${HOME}/.zshenv:

if ! pgrep -U `id -u` gpg-agent >/dev/null 2>&1; then
    eval `gpg-agent --daemon --write-env-file "${HOME}/.gpg-agent-info"`
else
    eval `cat "${HOME}/.gpg-agent-info"`
    export GPG_AGENT_INFO
fi

Hope this will help someone :-)

No Comments Yet

Comments RSS feed | Leave a Reply…

top