Agent Options - Using the GNU Privacy Guard
Description: Using the GNU Privacy Guard

Next: Agent Configuration, Previous: Agent Commands, Up: Invoking GPG-AGENT

### 2.2 Option Summary

`--options` file
  Reads 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` dir
  Set the name of the home directory to dir. If his 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 on the Registry entry HKCU\Software\GNU\GnuPG:HomeDir.
`-v`
`--verbose`
  Outputs additional information while running. You can increase the verbosity by giving several verbose commands to `gpgsm`, such as ``-vv`'.
`-q`
`--quiet`
  Try to be as quiet as possible.
`--batch`
  Don't invoke a pinentry or do any other thing requiring human interaction.
`--faked-system-time` epoch
  This 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` level
  Select the debug level for investigating problems. level may be one of:
  `none`
    no debugging at all.
  `basic`
    some basic debug messages
  `advanced`
    more verbose debug messages
  `expert`
    even more detailed messages
  `guru`
    all of the debug messages you can get

  How these messages are mapped to the actual debugging flags is not specified and may change with newer releaes of this program. They are however carefully selected to best aid in debugging.

`--debug` flags
  This 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-all`
  Same as `--debug=0xffffffff`
`--debug-wait` n
  When 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-detach`
  Don't detach the process from the console. This is manly usefule for debugging.
`-s`
`--sh`
`-c`
`--csh`
  Format the info output in daemon mode for use with the standard Bourne shell respective the C-shell . The default is to guess it based on the environment variable `SHELL` which is in almost all cases sufficient.
`--write-env-file` file
  Often 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-grab`
  Tell the pinentryo not to grab the keyboard and mouse. This option should in general not be used to avaoid X-sniffing attacks.
`--log-file` file
  Append all logging output to file. This is very helpful in seeing what the agent actually does.

`--allow-mark-trusted`
  Allow 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 inadvertly accept Root-CA keys.
`--ignore-cache-for-signing`
  This 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` n
  Set the time a cache entry is valid to n seconds. The default are 600 seconds.
`--default-cache-ttl-ssh` n
  Set the time a cache entry used for SSH keys is valid to n seconds. The default are 1800 seconds.
`--max-cache-ttl` n
  Set the maximum time a cache entry is valid to n seconds. After this time a cache entry will get expired even if it has been accessed recently. The default are 2 hours (7200 seconds).
`--max-cache-ttl-ssh` n
  Set the maximum time a cache entry used for SSH keys is valid to n seconds. After this time a cache entry will get expired even if it has been accessed recently. The default are 2 hours (7200 seconds).
`--min-passphrase-len` n
  Set the minimal length of a passphrase. When entering a new passphrase shorter than this value a warning will be displayed. Defaults to 8.
`--pinentry-program` filename
  Use program filename as the PIN entry. The default is installation dependend and can be shown with the `--version` command.
`--pinentry-touch-file` filename
  By default the file name 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` filename
  Use program filename as the Smartcard daemon. The default is installation dependend and can be shown with the `--version` command.
`--disable-scdaemon`
  Do 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-socket`
  By 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 the fall back to this socket. This option may not be used if the home directory is mounted as a remote file system.

  Note, that as of now, W32 systems default to this option.

`--display` string
`--ttyname` string
`--ttytype` string
`--lc-type` string
`--lc-messages` string
  These options are used with the server mode to pass localization information.
`--keep-tty`
`--keep-display`
  Ignore requests to change change the current `tty` respective the X window system's `DISPLAY` variable. This is useful to lock the pinentry to pop up at the `tty` or display you started the agent.

`--enable-ssh-support`
  Enable emulation of 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 seperate socket). Consequently, it should 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 follwing command may be used:

                echo UPDATESTARTUPTTY | gpg-connect-agent

All the long options may also be given in the configuration file after stripping off the two leading dashes.