<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/55784>55784</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Use of apt-key add is deprecated
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ADKaster
      </td>
    </tr>
</table>

<pre>
    Since apt version 2.4.x, Debian/Ubuntu guidance is to avoid use of apt-key to unconditionally trusting third party keys for any old package.

https://wiki.debian.org/DebianRepository/UseThirdParty
https://unix.stackexchange.com/questions/332672/how-to-add-a-third-party-repo-and-key-in-debian/582853#582853

The new approach is to drop the key into a secondary location, e.g. /etc/apt/keyrings or /usr/local/share/keyrings and add an entry to your sources.list for the repository that has a `signed-by` entry pointing to the third party gpg key.

Unfortunately it looks like add-apt-repository doesn't support supplying the signed-by entry yet, so it needs to be added manually.

https://bugs.launchpad.net/ubuntu/+source/software-properties/+bug/1862764

This affects the text of https://apt.llvm.org/ that provides manual instructions for adding the llvm-snapshot gpg key to the apt keyring, and the llvm.sh helper script pipes the key to apt-key add itself.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx9VE1v2zAM_TXORbCR2rGTHHxoV_Syy7CtP4C2GFuLK3mi1Nb_fqTidA0wDAgkWeLH4-NjOqeX9oexPSqYg3pFT8ZZVRa74j0rv6hH7AzYrHx67qINUQ3RaBBrQyo4Ba_OaBUJlTtJgPyMi9xH2zurTeBYME185SMFYwcVRuO1msGHRbEtqZPzCuyi3CTX_RkGLLLtY7a9v6xjCDNl1T1D4N-bOZtCJ0yF8wPfXAB-x9mRCc4vApXwp6T5Jln-FSVa815Q4Gz43o9gOWXvXvjhd0QSzMTnqiqbfcmH0b3lweWgdQ55wp8n_LnnpDlYLUXnxub6ylV9KA91lZXVevhUzs8RlcU35mr2Dvpx5VF7NzM3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