You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

217 lines
7.1 KiB

  1. <?xml version="1.0" encoding="utf-8" standalone="no"?>
  2. <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % aptent SYSTEM "apt.ent"> %aptent;
  5. <!ENTITY % aptverbatiment SYSTEM "apt-verbatim.ent"> %aptverbatiment;
  6. <!ENTITY % aptvendor SYSTEM "apt-vendor.ent"> %aptvendor;
  7. ]>
  8. <refentry>
  9. <refentryinfo>
  10. &apt-author.jgunthorpe;
  11. &apt-author.team;
  12. &apt-email;
  13. &apt-product;
  14. <!-- The last update date -->
  15. <date>2016-11-22T00:00:00Z</date>
  16. </refentryinfo>
  17. <refmeta>
  18. <refentrytitle>apt-key</refentrytitle>
  19. <manvolnum>8</manvolnum>
  20. <refmiscinfo class="manual">APT</refmiscinfo>
  21. </refmeta>
  22. <!-- Man page title -->
  23. <refnamediv>
  24. <refname>apt-key</refname>
  25. <refpurpose>APT key management utility</refpurpose>
  26. </refnamediv>
  27. &synopsis-command-apt-key;
  28. <refsect1><title>Description</title>
  29. <para>
  30. <command>apt-key</command> is used to manage the list of keys used
  31. by apt to authenticate packages. Packages which have been
  32. authenticated using these keys will be considered trusted.
  33. </para>
  34. <para>
  35. Note that if usage of <command>apt-key</command> is desired the additional
  36. installation of the GNU Privacy Guard suite (packaged in
  37. <package>gnupg</package>) is required. For this reason alone the programmatic
  38. usage (especially in package maintainer scripts!) is strongly discouraged.
  39. Further more the output format of all commands is undefined and can and does
  40. change whenever the underlying commands change. <command>apt-key</command> will
  41. try to detect such usage and generates warnings on stderr in these cases.
  42. </para>
  43. </refsect1>
  44. <refsect1><title>Supported keyring files</title>
  45. <para>apt-key supports only the binary OpenPGP format (also known as "GPG key
  46. public ring") in files with the "<literal>gpg</literal>" extension, not
  47. the keybox database format introduced in newer &gpg; versions as default
  48. for keyring files. Binary keyring files intended to be used with any apt
  49. version should therefore always be created with <command>gpg --export</command>.
  50. </para>
  51. <para>Alternatively, if all systems which should be using the created keyring
  52. have at least apt version >= 1.4 installed, you can use the ASCII armored
  53. format with the "<literal>asc</literal>" extension instead which can be
  54. created with <command>gpg --armor --export</command>.
  55. </para>
  56. </refsect1>
  57. <refsect1><title>Commands</title>
  58. <variablelist>
  59. <varlistentry><term><option>add</option> <option>&synopsis-param-filename;</option></term>
  60. <listitem>
  61. <para>
  62. Add a new key to the list of trusted keys.
  63. The key is read from the filename given with the parameter
  64. &synopsis-param-filename; or if the filename is <literal>-</literal>
  65. from standard input.
  66. </para>
  67. <para>
  68. It is critical that keys added manually via <command>apt-key</command> are
  69. verified to belong to the owner of the repositories they claim to be for
  70. otherwise the &apt-secure; infrastructure is completely undermined.
  71. </para>
  72. <para>
  73. <emphasis>Note</emphasis>: Instead of using this command a keyring
  74. should be placed directly in the <filename>/etc/apt/trusted.gpg.d/</filename>
  75. directory with a descriptive name and either "<literal>gpg</literal>" or
  76. "<literal>asc</literal>" as file extension.
  77. </para>
  78. </listitem>
  79. </varlistentry>
  80. <varlistentry><term><option>del</option> <option>&synopsis-param-keyid;</option></term>
  81. <listitem>
  82. <para>
  83. Remove a key from the list of trusted keys.
  84. </para>
  85. </listitem>
  86. </varlistentry>
  87. <varlistentry><term><option>export</option> <option>&synopsis-param-keyid;</option></term>
  88. <listitem>
  89. <para>
  90. Output the key &synopsis-param-keyid; to standard output.
  91. </para>
  92. </listitem>
  93. </varlistentry>
  94. <varlistentry><term><option>exportall</option></term>
  95. <listitem>
  96. <para>
  97. Output all trusted keys to standard output.
  98. </para>
  99. </listitem>
  100. </varlistentry>
  101. <varlistentry><term><option>list</option>, <option>finger</option></term>
  102. <listitem>
  103. <para>
  104. List trusted keys with fingerprints.
  105. </para>
  106. </listitem>
  107. </varlistentry>
  108. <varlistentry><term><option>adv</option></term>
  109. <listitem>
  110. <para>
  111. Pass advanced options to gpg. With <command>adv --recv-key</command> you
  112. can e.g. download key from keyservers directly into the trusted set of
  113. keys. Note that there are <emphasis>no</emphasis> checks performed, so it is
  114. easy to completely undermine the &apt-secure; infrastructure if used without
  115. care.
  116. </para>
  117. </listitem>
  118. </varlistentry>
  119. <varlistentry><term><option>update</option> (deprecated)</term>
  120. <listitem>
  121. <para>
  122. Update the local keyring with the archive keyring and remove from
  123. the local keyring the archive keys which are no longer valid.
  124. The archive keyring is shipped in the <literal>archive-keyring</literal> package of your
  125. distribution, e.g. the &keyring-package; package in &keyring-distro;.
  126. </para>
  127. <para>
  128. Note that a distribution does not need to and in fact should not use
  129. this command any longer and instead ship keyring files in the
  130. <filename>/etc/apt/trusted.gpg.d/</filename> directory directly as this
  131. avoids a dependency on <package>gnupg</package> and it is easier to manage
  132. keys by simply adding and removing files for maintainers and users alike.
  133. </para>
  134. </listitem>
  135. </varlistentry>
  136. <varlistentry><term><option>net-update</option></term>
  137. <listitem>
  138. <para>
  139. Perform an update working similarly to the <command>update</command> command above,
  140. but get the archive keyring from a URI instead and validate it against a master key.
  141. This requires an installed &wget; and an APT build configured to have
  142. a server to fetch from and a master keyring to validate.
  143. APT in Debian does not support this command, relying on
  144. <command>update</command> instead, but Ubuntu's APT does.
  145. </para>
  146. </listitem>
  147. </varlistentry>
  148. </variablelist>
  149. </refsect1>
  150. <refsect1><title>Options</title>
  151. <para>Note that options need to be defined before the commands described in the previous section.</para>
  152. <variablelist>
  153. <varlistentry><term><option>--keyring</option> <option>&synopsis-param-filename;</option></term>
  154. <listitem><para>With this option it is possible to specify a particular keyring
  155. file the command should operate on. The default is that a command is executed
  156. on the <filename>trusted.gpg</filename> file as well as on all parts in the
  157. <filename>trusted.gpg.d</filename> directory, though <filename>trusted.gpg</filename>
  158. is the primary keyring which means that e.g. new keys are added to this one.
  159. </para></listitem>
  160. </varlistentry>
  161. </variablelist>
  162. </refsect1>
  163. <refsect1><title>Files</title>
  164. <variablelist>
  165. &file-trustedgpg;
  166. </variablelist>
  167. </refsect1>
  168. <refsect1><title>See Also</title>
  169. <para>
  170. &apt-get;, &apt-secure;
  171. </para>
  172. </refsect1>
  173. &manbugs;
  174. &manauthor;
  175. </refentry>