Next: Agent Configuration, Previous: Agent Commands, Up: Invoking GPG-AGENT [Contents][Index]
--options fileReads configuration from file instead of from the default per-user configuration file. The default configuration file is named gpg-agent.conf and expected in the .gnupg directory directly below the home directory of the user.
--homedir dirSet the name of the home directory to dir. If this option is not
used, the home directory defaults to ~/.gnupg.  It is only
recognized when given on the command line.  It also overrides any home
directory stated through the environment variable GNUPGHOME or
(on W32 systems) by means of the Registry entry
HKCU\Software\GNU\GnuPG:HomeDir.
-v--verboseOutputs additional information while running.
You can increase the verbosity by giving several
verbose commands to gpgsm, such as ‘-vv’.
-q--quietTry to be as quiet as possible.
--batchDon’t invoke a pinentry or do any other thing requiring human interaction.
--faked-system-time epochThis option is only useful for testing; it sets the system time back or forth to epoch which is the number of seconds elapsed since the year 1970.
--debug-level levelSelect the debug level for investigating problems. level may be a numeric value or a keyword:
noneNo debugging at all. A value of less than 1 may be used instead of the keyword.
basicSome basic debug messages. A value between 1 and 2 may be used instead of the keyword.
advancedMore verbose debug messages. A value between 3 and 5 may be used instead of the keyword.
expertEven more detailed messages. A value between 6 and 8 may be used instead of the keyword.
guruAll of the debug messages you can get. A value greater than 8 may be used instead of the keyword. The creation of hash tracing files is only enabled if the keyword is used.
How these messages are mapped to the actual debugging flags is not specified and may change with newer releases of this program. They are however carefully selected to best aid in debugging.
--debug flagsThis option is only useful for debugging and the behaviour may change at any time without notice. FLAGS are bit encoded and may be given in usual C-Syntax. The currently defined bits are:
0  (1)X.509 or OpenPGP protocol related data
1  (2)values of big number integers
2  (4)low level crypto operations
5  (32)memory allocation
6  (64)caching
7  (128)show memory statistics.
9  (512)write hashed data to files named dbgmd-000*
10 (1024)trace Assuan protocol
12 (4096)bypass all certificate validation
--debug-allSame as --debug=0xffffffff
--debug-wait nWhen running in server mode, wait n seconds before entering the actual processing loop and print the pid. This gives time to attach a debugger.
--no-detachDon’t detach the process from the console. This is mainly useful for debugging.
-s--sh-c--cshFormat the info output in daemon mode for use with the standard Bourne
shell or the C-shell respectively.  The default is to guess it based on
the environment variable SHELL which is correct in almost all
cases.
--write-env-file fileOften it is required to connect to the agent from a process not being an
inferior of gpg-agent and thus the environment variable with
the socket name is not available.  To help setting up those variables in
other sessions, this option may be used to write the information into
file.  If file is not specified the default name
${HOME}/.gpg-agent-info will be used.  The format is suitable
to be evaluated by a Bourne shell like in this simple example:
eval $(cat file) eval $(cut -d= -f 1 < file | xargs echo export)
--no-grabTell the pinentry not to grab the keyboard and mouse. This option should in general not be used to avoid X-sniffing attacks.
--log-file fileAppend all logging output to file.  This is very helpful in seeing
what the agent actually does.  If neither a log file nor a log file
descriptor has been set on a Windows platform, the Registry entry
HKCU\Software\GNU\GnuPG:DefaultLogFile, if set, is used to specify
the logging output.
--allow-mark-trustedAllow clients to mark keys as trusted, i.e. put them into the trustlist.txt file. This is by default not allowed to make it harder for users to inadvertently accept Root-CA keys.
--no-allow-external-cacheTell Pinentry not to enable features which use an external cache for passphrases.
Some desktop environments prefer to unlock all credentials with one master password and may have installed a Pinentry which employs an additional external cache to implement such a policy. By using this option the Pinentry is advised not to make use of such a cache and instead always ask the user for the requested passphrase.
--ignore-cache-for-signingThis option will let gpg-agent bypass the passphrase cache for all
signing operation.  Note that there is also a per-session option to
control this behaviour but this command line option takes precedence.
--default-cache-ttl nSet the time a cache entry is valid to n seconds. The default is 600 seconds.
--default-cache-ttl-ssh nSet the time a cache entry used for SSH keys is valid to n seconds. The default is 1800 seconds.
--max-cache-ttl nSet the maximum time a cache entry is valid to n seconds.  After
this time a cache entry will be expired even if it has been accessed
recently or has been set using gpg-preset-passphrase.  The
default is 2 hours (7200 seconds).
--max-cache-ttl-ssh nSet the maximum time a cache entry used for SSH keys is valid to
n seconds.  After this time a cache entry will be expired even
if it has been accessed recently or has been set using
gpg-preset-passphrase.  The default is 2 hours (7200
seconds).
--enforce-passphrase-constraintsEnforce the passphrase constraints by not allowing the user to bypass them using the “Take it anyway” button.
--min-passphrase-len nSet the minimal length of a passphrase. When entering a new passphrase shorter than this value a warning will be displayed. Defaults to 8.
--min-passphrase-nonalpha nSet the minimal number of digits or special characters required in a passphrase. When entering a new passphrase with less than this number of digits or special characters a warning will be displayed. Defaults to 1.
--check-passphrase-pattern fileCheck the passphrase against the pattern given in file. When entering a new passphrase matching one of these pattern a warning will be displayed. file should be an absolute filename. The default is not to use any pattern file.
Security note: It is known that checking a passphrase against a list of pattern or even against a complete dictionary is not very effective to enforce good passphrases. Users will soon figure up ways to bypass such a policy. A better policy is to educate users on good security behavior and optionally to run a passphrase cracker regularly on all users passphrases to catch the very simple ones.
--max-passphrase-days nAsk the user to change the passphrase if n days have passed since the last change. With --enforce-passphrase-constraints set the user may not bypass this check.
--enable-passphrase-historyThis option does nothing yet.
--pinentry-program filenameUse program filename as the PIN entry. The default is installation dependent.
--pinentry-touch-file filenameBy default the filename of the socket gpg-agent is listening for
requests is passed to Pinentry, so that it can touch that file before
exiting (it does this only in curses mode).  This option changes the
file passed to Pinentry to filename.  The special name
/dev/null may be used to completely disable this feature.  Note
that Pinentry will not create that file, it will only change the
modification and access time.
--scdaemon-program filenameUse program filename as the Smartcard daemon.  The default is
installation dependent and can be shown with the gpgconf
command.
--disable-scdaemonDo not make use of the scdaemon tool. This option has the effect of disabling the ability to do smartcard operations. Note, that enabling this option at runtime does not kill an already forked scdaemon.
--use-standard-socket--no-use-standard-socketBy enabling this option gpg-agent will listen on the socket
named S.gpg-agent, located in the home directory, and not create
a random socket below a temporary directory.  Tools connecting to
gpg-agent should first try to connect to the socket given in
environment variable GPG_AGENT_INFO and then fall back to this
socket.  This option may not be used if the home directory is mounted on
a remote file system which does not support special files like fifos or
sockets.
Note, that --use-standard-socket is the default on
Windows systems.
The default may be changed at build time.  It is
possible to test at runtime whether the agent has been configured for
use with the standard socket by issuing the command gpg-agent
--use-standard-socket-p which returns success if the standard socket
option has been enabled.
--display string--ttyname string--ttytype string--lc-ctype string--lc-messages string--xauthority stringThese options are used with the server mode to pass localization information.
--keep-tty--keep-displayIgnore requests to change the current tty or X window system’s
DISPLAY variable respectively.  This is useful to lock the
pinentry to pop up at the tty or display you started the agent.
--enable-ssh-supportEnable the OpenSSH Agent protocol.
In this mode of operation, the agent does not only implement the gpg-agent protocol, but also the agent protocol used by OpenSSH (through a separate socket). Consequently, it should be possible to use the gpg-agent as a drop-in replacement for the well known ssh-agent.
SSH Keys, which are to be used through the agent, need to be added to the gpg-agent initially through the ssh-add utility. When a key is added, ssh-add will ask for the password of the provided key file and send the unprotected key material to the agent; this causes the gpg-agent to ask for a passphrase, which is to be used for encrypting the newly received key and storing it in a gpg-agent specific directory.
Once a key has been added to the gpg-agent this way, the gpg-agent will be ready to use the key.
Note: in case the gpg-agent receives a signature request, the user might need to be prompted for a passphrase, which is necessary for decrypting the stored key. Since the ssh-agent protocol does not contain a mechanism for telling the agent on which display/terminal it is running, gpg-agent’s ssh-support will use the TTY or X display where gpg-agent has been started. To switch this display to the current one, the following command may be used:
gpg-connect-agent updatestartuptty /bye
Although all GnuPG components try to start the gpg-agent as needed, this is not possible for the ssh support because ssh does not know about it. Thus if no GnuPG tool which accesses the agent has been run, there is no guarantee that ssh is abale to use gpg-agent for authentication. To fix this you may start gpg-agent if needed using this simple command:
gpg-connect-agent /bye
Adding the --verbose shows the progress of starting the agent.
All the long options may also be given in the configuration file after stripping off the two leading dashes.
Next: Agent Configuration, Previous: Agent Commands, Up: Invoking GPG-AGENT [Contents][Index]