I'm getting a little frustrated here, maybe you got an idea what the problem could be:
- I have a buildprocess with a few reprepro commands at the end
The buildscript is executed with sudo
( cd "$PUBLISHDIR" && \ reprepro -Vb . -C untested remove squeeze foobar && \ reprepro -Vb . -C untested includedeb squeeze ./foobar_*.deb && \ reprepro -Vb . -C untested list squeeze foobar )
I have gpg set up and the key is added. the agent is running
ps lax | grep gpg-agent 1 1002 25345 1 20 0 19284 996 - Ss ? 0:00 /usr/bin/gpg-agent --daemon --sh
My gpg-agent.conf is set up too
# ignore-cache-for-signing enable-ssh-support write-env-file /home/daily/.gnupg/gpg-agent-info default-cache-ttl 31536000 default-cache-ttl-ssh 31536000 max-cache-ttl 31536000 max-cache-ttl-ssh 31536000 debug-all
And i start the agent like this in the .bashrc
GNUPGHOME=~/.gnupg GPGAGENT=/usr/bin/gpg-agent PID_FILE=$GNUPGHOME/gpg-agent-info if grep -qs '^[[:space:]]*use-agent' "$GNUPGHOME/gpg.conf" "$GNUPGHOME/options" && test -x $GPGAGENT & then if [ -r "$PID_FILE" ]; then . "$PID_FILE" count=`ps lax | grep "/usr/bin/gpg-agent" | grep "$SSH_AGENT_PID" | wc -l` if [ $count -eq 0 ]; then if ! $GPGAGENT 2>/dev/null; then $GPGAGENT --daemon --sh > "$PID_FILE" . "$PID_FILE" echo "INFO::agent started" fi else echo "INFO::agent already running" fi fi fi ssh-add
But no matter how often I run the whole process, it will always ask me for the passphrase during the sign-process of reprepro. I thought the agent would cache this passphrase and next execution it will be stored and not beeing asked anymore... but it does ask for the passphrase... again and again...
can anyone think of a mistake or something else maybe why it always asks for the passphrase?
sudo
preserving the environment as necessary?echo $GPG_AGENT_INFO
from? Try putting it in your build script and see what it says.sudo -E
might work, but I'm not sure it's secure.