Solution: centos6 can't connect to /root/.gnupg/S.gpg-agent

Today i faced a problem, when i want to git commit -S --signoff for my repository, i recieved error message: can't connect to /root/.gnupg/S.gpg-agent

i have done many research, google for more than ten page solution, at last i found the right solution:

Let's going explain this:

by default, the GPG-agent not started, you need to started it manually, but you should aware, you need add agruments :

gpg-agent --daemon --use-standard-socket

after you started gpg-agent, you should using it . git commit -S --signoff will working correct.

but we need do more. we want gpg-agent auto started once system boot.

we add one line to /sbin/ifup-local.

it will lead gpg-agent auto start once the system boot and network up.

have fun with it.

my /sbin/ifup-local file like this:

#!/bin/sh/usr/bin/gpg-agent --daemon --use-standard-socket


分类: Linux/Unix 标签: GnuPG CentOS 发布于: 2013, 点击数: