Knowledge Base
Search
New article
Authentication is disabled (development mode).
Edit article
Title
Tags
Content
<pre><code class="language-diff">-wget -qO- https://myrepo.example/myrepo.asc | sudo apt-key add - +wget -qO- https://myrepo.example/myrepo.asc | sudo tee /etc/apt/trusted.gpg.d/myrepo.asc</code></pre><pre><code class="language-diff"> curl -fsSL https://apt.releases.hashicorp.com/gpg | -sudo apt-key add - +sudo gpg --dearmor -o /etc/apt/keyrings/hashicorp-archive-keyring.gpg</code></pre><p>Make sure to use the "asc" extension for ASCII armored keys and the "gpg" extension for the binary OpenPGP format.</p><p>Recommended: Instead of placing keys into the /etc/apt/trusted.gpg.d directory, you can place them anywhere on your filesystem by using the Signed-By option in your sources.list and pointing to the filename of the key:<br>Legacy format:</p><pre><code class="language-plaintext">deb [signed-by=/usr/share/keyrings/kitware-archive-keyring.gpg] https://apt.kitware.com/ubuntu/ noble main</code></pre><p>DEB822-formatted:</p><pre><code class="language-plaintext">Types: deb URIs: http://security.ubuntu.com/ubuntu Suites: noble-security Components: main universe restricted multiverse Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg</code></pre><p><a href="https://www.digitalocean.com/community/tutorials/how-to-handle-apt-key-and-add-apt-repository-deprecation-using-gpg-to-add-external-repositories-on-ubuntu-22-04">How To Handle apt-key and add-apt-repository Deprecation Using gpg to Add External Repositories on Ubuntu 22.04</a></p>
Save
Cancel