makepkg: unset errexit when sourcing /etc/profile
[pacman-ng.git] / doc / pacman-key.8.txt
blob5f9472843e8e75a0117cb74da0ffdc510fe0def5
1 /////
2 vim:set ts=4 sw=4 syntax=asciidoc noet spell spelllang=en_us:
3 /////
4 pacman-key(8)
5 =============
8 Name
9 ----
10 pacman-key - manage pacman's list of trusted keys
13 Synopsis
14 --------
15 'pacman-key' [options]
18 Description
19 -----------
20 'pacman-key' is a wrapper script for GnuPG used to manage pacman's keyring, which
21 is the collection of PGP keys used to check signed packages and databases. It
22 provides the ability to import and export keys, fetch keys from keyservers and
23 update the key trust database.
25 More complex keyring management can be achieved using GnuPG directly combined with
26 the '\--homedir' option pointing at the pacman keyring (located in
27 +{sysconfdir}/pacman.d/gnupg+ by default).
30 Options
31 -------
32 *-a, \--add* [file(s)]::
33         Add the key(s) contained in the specified file or files to pacman's
34         keyring. If a key already exists, update it.
36 *\--config* <file>::
37         Use an alternate config file instead of the +{sysconfdir}/pacman.conf+
38         default.
40 *-d, \--delete* <keyid(s)>::
41         Remove the key(s) identified by the specified keyid(s) from pacman's
42         keyring.
44 *-e, \--export* [keyid(s)]::
45         Export key(s) identified by the specified keyid(s) to 'stdout'. If no keyid
46         is specified, all keys will be exported.
48 *\--edit-key* <keyid(s)>::
49         Present a menu for key management task on the specified keyid(s). Useful
50         for adjusting a keys trust level.
52 *-f, \--finger* [keyid(s)]::
53         List a fingerprint for each specified keyid, or for all known keys if no
54         keyids are specified.
56 *\--gpgdir* <dir>::
57         Set an alternate home directory for GnuPG. If unspecified, the value is
58         read from +{sysconfdir}/pacman.conf+.
60 *-h, \--help*::
61         Output syntax and command line options.
63 *\--import* <dir(s)>::
64         Adds keys from pubring.gpg into pacman's keyring and imports ownertrust
65         values from trustdb.gpg in the specified directories.
67 *\--import-dirs* <dir(s)> ::
68         Imports ownertrust values from trustdb.gpg in the specified directories.
70 *\--init*::
71         Ensure the keyring is properly initialized and has the required access
72         permissions.
74 *\--keyserver* <keyserver>::
75         Use the specified keyserver if the operation requires one. This will take
76         precedence over any keyserver option specified in a `gpg.conf`
77         configuration file. Running '\--init' with this option will set the default
78         keyserver if one was not already configured.
80 *-l, \--list-keys* [keyid(s)]::
81         Lists all or specified keys from the public keyring.
83 *\--list-sigs* [keyid(s)]::
84         Same as '\--list-keys', but the signatures are listed too.
86 *\--lsign-key* <keyid>::
87         Locally sign the given key. This is primarily used to root the web of trust
88         in the local private key generated by '\--init'.
90 *-r, \--recv-keys* <keyid(s)>::
91         Equivalent to '\--recv-keys' in GnuPG.
93 *\--refresh-keys* [keyid(s)]::
94         Equivalent to '\--refresh-keys' in GnuPG.
96 *\--populate* [keyring(s)]::
97         Reload the default keys from the (optionally provided) keyrings in
98         +{pkgdatadir}/keyrings+. For more information, see
99         <<SC,Providing a Keyring for Import>> below.
101 *-u, \--updatedb*::
102         Equivalent to '\--check-trustdb' in GnuPG.
104 *-v, \--verify* <signature>::
105         Verify the given signature file.
107 *-V, \--version*::
108         Displays the program version.
111 Providing a Keyring for Import
112 ------------------------------
113 A distribution or other repository provided may want to provide a set of valid
114 PGP keys used in the signing of its packages and repository databases that can
115 be readily imported into the pacman keyring.  This is achieved by providing a
116 PGP keyring file `foo.gpg` that contains the keys for the foo keyring in the
117 directory +{pkgdatadir}/keyrings+. Optionally the file `foo-revoked` can be
118 provided containing a list of revoked key IDs for that keyring. These files are
119 required to be signed (detached) by a trusted PGP key that the user must
120 manually import to the pacman keyring. This prevents a potentially malicious
121 repository adding keys to the pacman keyring without the users knowledge.
123 A key being marked as revoked always takes priority over the key being added to
124 the pacman keyring, regardless of the keyring it is provided in. To prevent a
125 key from being revoked when using '\--populate', its ID can be listed in
126 +{sysconfdir}/pacman.d/gnupg/holdkeys+.
128 See Also
129 --------
130 linkman:pacman[8], linkman:pacman.conf[5]
132 include::footer.txt[]