# GPG Signature support removed from PyPI

**URL:** <https://discuss.python.org/t/gpg-signature-support-removed-from-pypi/27014>\
**Category:** Packaging\
**Created:** [May 23, 2023, 2:31pm UTC](https://discuss.python.org/t/gpg-signature-support-removed-from-pypi/27014 "2023-05-23T14:31:52Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![dstufft](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/dstufft/32/23_2.png) [@dstufft](https://discuss.python.org/u/dstufft)\
**Post date:** [May 23, 2023, 2:31pm UTC](https://discuss.python.org/t/gpg-signature-support-removed-from-pypi/27014/1 "2023-05-23T14:31:52Z")

</div>

You can read more about it [here](https://blog.pypi.org/posts/2023-05-23-removing-pgp/), but tl;dr is that due to the fact the basically nobody used the GPG signature support _and_ of the people who did use it, nearly 2/3 of the uploaded signatures in the last year were made by keys that could not meaningfully be validated.

---

<div class="post-metadata">

**Author:** ![fungi](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/fungi/32/5963_2.png) [@fungi](https://discuss.python.org/u/fungi)\
**Post date:** [May 23, 2023, 2:50pm UTC](https://discuss.python.org/t/gpg-signature-support-removed-from-pypi/27014/2 "2023-05-23T14:50:37Z")

</div>

It’s worth pointing out that at least some of the lack of use was  
not necessarily due to a lack of desire for the feature, but rather  
repeated signals that it could (and likely would) go away at any  
time.

Because the PyPI admins had been talking about removing it even  
during the Cheeseshop days, and the direction with Warehouse  
development indicated OpenPGP signature support would be omitted  
then as well (to make room for TUF), at least the OpenStack  
community made the decision to publish signatures for all their  
packages on a completely separate site rather than continue  
uploading them to PyPI.

I would not be surprised if other large communities came to similar  
conclusions and solutions for attestation of their packages as well.

---

<div class="post-metadata">

**Author:** ![dstufft](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/dstufft/32/23_2.png) [@dstufft](https://discuss.python.org/u/dstufft)\
**Post date:** [May 23, 2023, 3:27pm UTC](https://discuss.python.org/t/gpg-signature-support-removed-from-pypi/27014/3 "2023-05-23T15:27:38Z")

</div>

Sure! Though my numbers in 2016 were only a little bit better, 4% of uploads had signatures (I did not do any checking how many of them were valid), compared to 0.3% now.

Further, I do not believe that anyone who has seriously worked on PyPI security in the past 10? 15? years considered GPG to be part of the solution, rather than being a weird vestigial thing that just happened to still exist.

---

<div class="post-metadata">

**Author:** ![fungi](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/fungi/32/5963_2.png) [@fungi](https://discuss.python.org/u/fungi)\
**Post date:** [May 23, 2023, 4:49pm UTC](https://discuss.python.org/t/gpg-signature-support-removed-from-pypi/27014/4 "2023-05-23T16:49:54Z")

</div>

A definite up-side here is that I finally get to stop explaining to  
users why we aren’t publishing our OpenPGP signatures to  
PyPI. 😉

---

<div class="post-metadata">

**Author:** ![Erotemic](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/erotemic/32/8025_2.png) [@Erotemic](https://discuss.python.org/u/Erotemic)\
**Post date:** [June 1, 2023, 12:09am UTC](https://discuss.python.org/t/gpg-signature-support-removed-from-pypi/27014/5 "2023-06-01T00:09:02Z")

</div>

I’m sad to see this decision. Software signatures are not the entire solution, but if you do have a means of verying the owner of a key, you could verify the software you’ve downloaded is from a trusted source.

The number of people uploading packages with signatures is irrelevant. What matters is that some people have a subset of packages with signatures that they trust. This vastly limits the pool of packages, but that’s the point.

If you put in the work to validate the signers (and that need not be through public keyservers) it’s unfortunate you can no longer check the package signatures.

Perhaps GPG isn’t the greatest tool, but some package signing method should be supported before removing this one. The problem is that most people aren’t using GPG correctly, but the solution here is that nobody gets to use it. I think this is a mistake.

---

<div class="post-metadata">

**Author:** ![FFY00](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/ffy00/32/4007_2.png) [@FFY00](https://discuss.python.org/u/FFY00)\
**Post date:** [June 1, 2023, 12:21am UTC](https://discuss.python.org/t/gpg-signature-support-removed-from-pypi/27014/6 "2023-06-01T00:21:31Z")

</div>

FWIW I upload signatures for all my projects, including pypa/build.

---

<div class="post-metadata">

**Author:** ![fungi](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/fungi/32/5963_2.png) [@fungi](https://discuss.python.org/u/fungi)\
**Post date:** [June 1, 2023, 12:53pm UTC](https://discuss.python.org/t/gpg-signature-support-removed-from-pypi/27014/7 "2023-06-01T12:53:59Z")

</div>

As previously mentioned, you can certainly publish detached OpenPGP  
signatures of all your sdists/wheels to a separate site. If users  
already need to do out-of-band work to determine that they trust  
your signing keys then also going somewhere else to download the  
signatures (from your project site for example) isn’t a huge  
stretch.

This was the compromise we arrived at long ago for the OpenStack  
community’s many projects. Downstream redistributors (like those  
doing packaging work in GNU/Linux distributions) know where to find  
the signatures from our release automation in order to make sure  
that what they retrieved from PyPI hasn’t been tampered with  
at/after publication.

---

<div class="post-metadata">

**Author:** ![FFY00](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/ffy00/32/4007_2.png) [@FFY00](https://discuss.python.org/u/FFY00)\
**Post date:** [June 1, 2023, 5:39pm UTC](https://discuss.python.org/t/gpg-signature-support-removed-from-pypi/27014/8 "2023-06-01T17:39:22Z")

</div>

Yes, I agree that this isn’t a huge deal since you can publish the signatures externally, it’s just a bit annoying.

That said, I also publish signed git tags for all releases of my projects, and putting my downstream packager hat on, that is usually preferred over PyPI artifacts anyway.

---

<div class="post-metadata">

**Author:** ![lilydjwg](https://sea2.discourse-cdn.com/flex002/user_avatar/discuss.python.org/lilydjwg/32/12977_2.png) [@lilydjwg](https://discuss.python.org/u/lilydjwg)\
**Post date:** [June 17, 2023, 11:27am UTC](https://discuss.python.org/t/gpg-signature-support-removed-from-pypi/27014/9 "2023-06-17T11:27:40Z")

</div>

I feel sad about this too. While _I_ can publish signatures elsewhere (I’m signing git tags anyway), it’s a problem to verify the publisher of PyPI packages, and PGP signatures _could_ be one method. PGP signatures are the only well-supported way to verify publisher without trusting a third party (at least, not around the time of verification).
