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.
 
 
 
 
 
 

219 lines
7.2 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>2020-05-06T00: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>Deprecated 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. Use of <command>apt-key</command> is deprecated, except for the use of
  36. <command>apt-key del</command> in maintainer scripts to remove existing
  37. keys from the main keyring.
  38. If such usage of <command>apt-key</command> is desired the additional
  39. installation of the GNU Privacy Guard suite (packaged in
  40. <package>gnupg</package>) is required.
  41. </para>
  42. <para>
  43. apt-key(8) will last be available in Debian 11 and Ubuntu 22.04.
  44. </para>
  45. </refsect1>
  46. <refsect1><title>Supported keyring files</title>
  47. <para>apt-key supports only the binary OpenPGP format (also known as "GPG key
  48. public ring") in files with the "<literal>gpg</literal>" extension, not
  49. the keybox database format introduced in newer &gpg; versions as default
  50. for keyring files. Binary keyring files intended to be used with any apt
  51. version should therefore always be created with <command>gpg --export</command>.
  52. </para>
  53. <para>Alternatively, if all systems which should be using the created keyring
  54. have at least apt version >= 1.4 installed, you can use the ASCII armored
  55. format with the "<literal>asc</literal>" extension instead which can be
  56. created with <command>gpg --armor --export</command>.
  57. </para>
  58. </refsect1>
  59. <refsect1><title>Commands</title>
  60. <variablelist>
  61. <varlistentry><term><option>add</option> <option>&synopsis-param-filename;</option> (deprecated)</term>
  62. <listitem>
  63. <para>
  64. Add a new key to the list of trusted keys.
  65. The key is read from the filename given with the parameter
  66. &synopsis-param-filename; or if the filename is <literal>-</literal>
  67. from standard input.
  68. </para>
  69. <para>
  70. It is critical that keys added manually via <command>apt-key</command> are
  71. verified to belong to the owner of the repositories they claim to be for
  72. otherwise the &apt-secure; infrastructure is completely undermined.
  73. </para>
  74. <para>
  75. <emphasis>Note</emphasis>: Instead of using this command a keyring
  76. should be placed directly in the <filename>/etc/apt/trusted.gpg.d/</filename>
  77. directory with a descriptive name and either "<literal>gpg</literal>" or
  78. "<literal>asc</literal>" as file extension.
  79. </para>
  80. </listitem>
  81. </varlistentry>
  82. <varlistentry><term><option>del</option> <option>&synopsis-param-keyid;</option> (mostly deprecated)</term>
  83. <listitem>
  84. <para>
  85. Remove a key from the list of trusted keys.
  86. </para>
  87. </listitem>
  88. </varlistentry>
  89. <varlistentry><term><option>export</option> <option>&synopsis-param-keyid;</option> (deprecated)</term>
  90. <listitem>
  91. <para>
  92. Output the key &synopsis-param-keyid; to standard output.
  93. </para>
  94. </listitem>
  95. </varlistentry>
  96. <varlistentry><term><option>exportall</option> (deprecated)</term>
  97. <listitem>
  98. <para>
  99. Output all trusted keys to standard output.
  100. </para>
  101. </listitem>
  102. </varlistentry>
  103. <varlistentry><term><option>list</option>, <option>finger</option> (deprecated)</term>
  104. <listitem>
  105. <para>
  106. List trusted keys with fingerprints.
  107. </para>
  108. </listitem>
  109. </varlistentry>
  110. <varlistentry><term><option>adv</option> (deprecated)</term>
  111. <listitem>
  112. <para>
  113. Pass advanced options to gpg. With <command>adv --recv-key</command> you
  114. can e.g. download key from keyservers directly into the trusted set of
  115. keys. Note that there are <emphasis>no</emphasis> checks performed, so it is
  116. easy to completely undermine the &apt-secure; infrastructure if used without
  117. care.
  118. </para>
  119. </listitem>
  120. </varlistentry>
  121. <varlistentry><term><option>update</option> (deprecated)</term>
  122. <listitem>
  123. <para>
  124. Update the local keyring with the archive keyring and remove from
  125. the local keyring the archive keys which are no longer valid.
  126. The archive keyring is shipped in the <literal>archive-keyring</literal> package of your
  127. distribution, e.g. the &keyring-package; package in &keyring-distro;.
  128. </para>
  129. <para>
  130. Note that a distribution does not need to and in fact should not use
  131. this command any longer and instead ship keyring files in the
  132. <filename>/etc/apt/trusted.gpg.d/</filename> directory directly as this
  133. avoids a dependency on <package>gnupg</package> and it is easier to manage
  134. keys by simply adding and removing files for maintainers and users alike.
  135. </para>
  136. </listitem>
  137. </varlistentry>
  138. <varlistentry><term><option>net-update</option> (deprecated)</term>
  139. <listitem>
  140. <para>
  141. Perform an update working similarly to the <command>update</command> command above,
  142. but get the archive keyring from a URI instead and validate it against a master key.
  143. This requires an installed &wget; and an APT build configured to have
  144. a server to fetch from and a master keyring to validate.
  145. APT in Debian does not support this command, relying on
  146. <command>update</command> instead, but Ubuntu's APT does.
  147. </para>
  148. </listitem>
  149. </varlistentry>
  150. </variablelist>
  151. </refsect1>
  152. <refsect1><title>Options</title>
  153. <para>Note that options need to be defined before the commands described in the previous section.</para>
  154. <variablelist>
  155. <varlistentry><term><option>--keyring</option> <option>&synopsis-param-filename;</option> (deprecated)</term>
  156. <listitem><para>With this option it is possible to specify a particular keyring
  157. file the command should operate on. The default is that a command is executed
  158. on the <filename>trusted.gpg</filename> file as well as on all parts in the
  159. <filename>trusted.gpg.d</filename> directory, though <filename>trusted.gpg</filename>
  160. is the primary keyring which means that e.g. new keys are added to this one.
  161. </para></listitem>
  162. </varlistentry>
  163. </variablelist>
  164. </refsect1>
  165. <refsect1><title>Files</title>
  166. <variablelist>
  167. &file-trustedgpg;
  168. </variablelist>
  169. </refsect1>
  170. <refsect1><title>See Also</title>
  171. <para>
  172. &apt-get;, &apt-secure;
  173. </para>
  174. </refsect1>
  175. &manbugs;
  176. &manauthor;
  177. </refentry>