Setting up gpg-agent

  1. Configuring gpg-agent

    To avoid typing your GPG passphrase again and again, you probably want this in your ~/.profile:

    	  <snip>
    if test -f $HOME/.gpg-agent-info && kill -0 $(cut -d: -f 2 $HOME/.gpg-agent-info) 2>/dev/null; then
        eval $(cat $HOME/.gpg-agent-info)
    else
        eval $(gpg-agent --pinentry-program /usr/bin/pinentry --daemon --write-env-file $HOME/.gpg-agent-info)
    fi
    GPG_TTY=$(tty)
    
    # GPG_AGENT_INFO is set from within $HOME/.gpg-agent-info, but still needs to be exported
    export GPG_TTY GPG_AGENT_INFO	
    	    

  2. Configuring GnuPG

    In ~/.gnupg/gpg.conf, you want to put:

    use-agent
    	    

  3. Making GPG keys available

    You must copy your gpg key to the packaging host, e.g. like this:

    ... and import on the packaging host: