Skip to content

Commit 30c6ea7

Browse files
committed
DOC/REL: add SSH signing for release tags
We've used PGP signing for releases to date. Unfortunately that has poor usability, and it doesn't add much real-world protection especially if keys aren't exercised regularly, don't have a broad web of trust, and cannot be revoked. The poor usability now bit us concretely - I don't have access to the machine I normally do releases from, so the key in the docs isn't available. This isn't fixable on a reasonable time-scale. So, do the obvious thing (short of stopping signing completely) and switch to SSH-signed tags. Those are much easier to use, and in case of new machines, lost keys, etc. a maintainer can easily create a new key and use the features GitHub offers to make it a signing key. The `.github/allowed_signers` file should then be updated for it. Amend the 0.21.0 Changelog entry for this change. Also fix the release date in the Changelog.
1 parent dc5fa11 commit 30c6ea7

4 files changed

Lines changed: 57 additions & 26 deletions

File tree

‎.github/allowed_signers‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# SPDX-FileCopyrightText: 2026 The meson-python developers
2+
#
3+
# SPDX-License-Identifier: MIT
4+
#
5+
# SSH allowed signers for verifying signed git tags.
6+
#
7+
# Verify a release tag with:
8+
# git config gpg.ssh.allowedSignersFile .github/allowed_signers
9+
# git verify-tag X.Y.Z
10+
#
11+
# Each entry maps a maintainer's git identity (email) to the SSH signing
12+
# public key they use for `git tag -s`. Keys are also published at
13+
# https://api.github.com/users/<user>/ssh_signing_keys
14+
15+
ralf.gommers@gmail.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIJs4By1YLtDpC0xqbj3CqIk6cbb7MWyKJp15tuYOjXMQ

‎CHANGELOG.rst‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,11 @@ Changelog
2222
build errors when rebuilding.
2323
- Use ``.start`` files (PEP 829) instead of ``.pth`` files to implement editable
2424
wheels for Python 3.15 and later.
25+
- Release tags are now SSH-signed. Tags up to and including ``0.20.0`` are
26+
PGP-signed. See the signing keys and verification instructions in the
27+
documentation.
2528

26-
Daniele Nicolodi, Michał Górny, Ralf Gommers --- 25-08-2026.
29+
Daniele Nicolodi, Michał Górny, Ralf Gommers --- 03-09-2026.
2730

2831

2932
0.20.0

‎RELEASE.rst‎

Lines changed: 21 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,14 @@
55
Release Process
66
===============
77

8-
All releases are PGP signed with one of the keys listed in ``docs/about.rst``.
9-
Before releasing please make sure your PGP key is listed there, and preferably
10-
signed by one of the other key holders.
8+
All releases are signed with one of the keys listed in ``docs/about.rst``.
9+
Signing is done with either a PGP key (up to 0.20.0) or an SSH signing key.
10+
Before releasing please make sure your signing key is listed there.
1111

12-
If your key is not signed by one of the other key holders, please make sure
13-
that the PR that added your key to ``docs/about.rst`` was approved by at least
14-
one other maintainer.
12+
For a PGP key, it should preferably be signed by one of the other key holders.
13+
If it is not, or if you use an SSH signing key (which has no web of trust),
14+
please make sure that the PR that added your key to ``docs/about.rst`` was
15+
approved by at least one other maintainer.
1516

1617
After that is done, you may release the project by following these steps:
1718

@@ -23,36 +24,32 @@ After that is done, you may release the project by following these steps:
2324
#. Create ``CHANGELOG.rst`` section for the new release and fill it.
2425
#. The commit message should read: ``REL: set version to X.Y.Z``
2526

26-
#. Create a GPG-signed tag for the release:
27+
#. Create a signed tag for the release:
2728

2829
.. code-block:: console
2930
3031
$ git tag -s X.Y.Z
3132
32-
The tag title should follow the ``meson-python X.Y.Z`` format, and the
33-
tag body should be a plain text version of the change-log for the current
34-
release.
35-
36-
#. Push the commit and tag to the repository:
33+
This signs with your PGP key by default. To sign with an SSH key instead,
34+
configure git once beforehand:
3735

3836
.. code-block:: console
3937
40-
$ git push
41-
$ git push --tags
42-
43-
#. Release to PyPI:
38+
$ git config --global gpg.format ssh
39+
$ git config --global user.signingkey ~/.ssh/id_ed25519.pub
4440
45-
#. Build the Python artifacts:
41+
With ``gpg.format=ssh`` set, ``git tag -s`` produces an SSH signature; the
42+
command itself is unchanged. The SSH signing key must be registered on
43+
GitHub as a Signing Key for the tag to show as verified.
4644

47-
.. code-block:: console
48-
49-
$ python -m build
45+
The tag title should follow the ``meson-python X.Y.Z`` format, and the
46+
tag body should be a plain text version of the change-log for the current
47+
release.
5048

51-
#. Push the artifacts to PyPI:
49+
#. Push the tag to the repository:
5250

5351
.. code-block:: console
5452
55-
$ twine upload dist/*
53+
$ git push --tags
5654
57-
There is no need to GPG-sign the artifacts: PyPI no longer
58-
supports uploading GPG signatures.
55+
#. Release to PyPI is done via trusted publishing, triggering on the tag.

‎docs/about.rst‎

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,30 @@ supported Python versions.
4949

5050
Distributors are recommended to fetch release sources from the
5151
corresponding tags on the Git repository_ or from source distributions
52-
on `PyPI`_. Git tags are PGP-signed with one of the following keys:
52+
on `PyPI`_. Git tags are signed by a maintainer, using either a PGP or an
53+
SSH signing key.
54+
55+
Tags from ``0.21.0`` onwards are SSH-signed. The SSH signing keys are published
56+
at |rgommers-ssh-signing-keys|_ (Ralf Gommers). An SSH-signed tag can be
57+
verified using the ``allowed_signers`` file shipped in the repository:
58+
59+
.. code-block:: console
60+
61+
$ git config gpg.ssh.allowedSignersFile .github/allowed_signers
62+
$ git verify-tag X.Y.Z
63+
64+
Tags up to and including ``0.20.0`` are PGP-signed with one of the following
65+
keys:
5366

5467
- |3DCE51D60930EBA47858BA4146F633CBB0EB4BF2|_ Filipe Laíns
5568
- |52BDC33FD1FBAB569D47FFA923D9E5499A08BDC5|_ Ralf Gommers
5669

5770
.. _repository: https://github.com/mesonbuild/meson-python
5871
.. _PyPI: https://pypi.org/project/meson-python/
5972

73+
.. |rgommers-ssh-signing-keys| replace:: ``https://api.github.com/users/rgommers/ssh_signing_keys``
74+
.. _rgommers-ssh-signing-keys: https://api.github.com/users/rgommers/ssh_signing_keys
75+
6076
.. |3DCE51D60930EBA47858BA4146F633CBB0EB4BF2| replace:: ``3DCE51D60930EBA47858BA4146F633CBB0EB4BF2``
6177
.. _3DCE51D60930EBA47858BA4146F633CBB0EB4BF2: https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3dce51d60930eba47858ba4146f633cbb0eb4bf2
6278

0 commit comments

Comments
 (0)