Skip to content
Laissez

Sign GitHub commits with Passport

Sign a commit with Touch ID on your Mac, then verify it in GitHub and Passport. Passport uses the GitHub-compatible format by default for your hardware signing key.

Set up signing in your repository

Install Passport on your Mac and enroll with your team’s Passport server. Use a server that supports GitHub-compatible Passport signatures. If your hardware key is already enrolled and selected, run only the last command in your clone.

Replace the example server, SSH login, and hostname with the ones your team gave you.

laissez keys enroll-se --ca https://passport.example
laissez ssh setup https://passport.example --principal alice \
  --hosts 'ssh.example.com' --signing-key attested
laissez git setup --ca https://passport.example

Add your public key to GitHub

Export the public key from your Passport app and register it with GitHub.

key_file=$(mktemp)
laissez git public-key > "$key_file" &&
  gh ssh-key add "$key_file" --type signing --title 'Passport Secure Enclave'

For browser setup, copy it with laissez git public-key | pbcopy on your Mac. Open Settings → SSH and GPG keys → New SSH key, select Signing Key, and paste the public key. GitHub manages commit signing and SSH login keys separately. GitHub’s key setup guide

Sign and check a commit

After editing your repository’s README, create a signed commit.

git add -- README.md
git commit -S --only -m "Explain token setup" -- README.md

Read Passport’s Sign commit window and approve with Touch ID. After Git creates the commit, run git push. Open the commit on GitHub to see its Verified badge. If the badge is missing, check that the Passport public key is on your account as a signing key and that the commit uses an email verified on that account. GitHub’s signature verification guide · GitHub’s verification results

Where you look What it checks
GitHub Verified GitHub checked the commit signature against the public signing key registered to your account.
Passport verified Passport checked the signature and found a matching approval record for the hardware key.

Passport’s verification runs on the team’s configured GitHub check or public maintainer profile.

Upgrade the Passport server before switching a repository that requires the Passport check. If you’re still using a signing certificate issued before the upgrade, let it expire before making the first GitHub-compatible commit so the server has a record of the replacement certificate.

Keep working, then sign a whole stack at once

When you are away from your Mac, a coding agent can keep committing on an unsigned branch. You review and sign everything later with one Touch ID.

laissez git commit --defer -m "Explain token setup"   # commits on passport/pending/<branch>
laissez git pending                                   # what is waiting
laissez git sign-pending                              # review and sign the stack

laissez git commit --defer takes the usual git commit arguments and leaves your branch where it was. laissez git sign-pending shows every commit in one Passport window. After one approval, Passport signs them all and your branch moves to the signed commits, or, on any failure, nothing moves. The unsigned commits stay available under refs/passport/unsigned/<branch>/.

Things to know:

Use a signing certificate for offline verification

If your release process uses the offline laissez-verify-commit tool, keep the signing certificate inside the commit signature.

laissez git setup --ca https://passport.example --certificate-signatures

Run laissez git setup without that flag to use the GitHub-compatible format again.

Gate releases with laissez-verify-commit

laissez-verify-commit checks a release tag before you publish it. Sign the tag with git tag -s while certificate signatures are on, then verify the full tag ref:

curl -fsSL https://passport.example/v1/ca.pub -o laissez-ca.pub
laissez-verify-commit --ca-pubkey "$(cat laissez-ca.pub)" --ref refs/tags/v2.4.0

--ca-pubkey takes the key line itself, not a file path. By default the tool requires all of these:

The signer chooses the tagger time. Use --max-signature-age 1h to also refuse tags made more than an hour before the check runs. Revocation is not checked: a certificate counts for any tag whose tagger time falls inside its validity, even after the device or person is revoked.

Optional flags:

The tool ignores replace refs when it reads objects.

If your CA signs certificates through a customer-held laissez-signer, add lz-posture-outcome@laissez and lz-policy-hash@laissez to the signer's [floor] extensions before you upgrade. Git-signing certificates now carry both, and a floor that does not allow them refuses every git-signing request.

Migrating from the earlier release-gate snippet

Earlier snippets used settings that now fail:

In GitHub Actions

In GitHub Actions, run the check on tag pushes with the .github/actions/verify-release action, or copy the workflow from your CA's Connect page. actions/checkout may leave the tag as a lightweight tag, so fetch the tag object first. The fetch step reads the ref from the GITHUB_REF environment variable. A ${{ github.ref }} written into a run: line would be pasted into the shell script, and a tag name can contain shell syntax.

on:
  push:
    tags: ["v*"]
jobs:
  verify-release-tag:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - run: git fetch --force origin "+$GITHUB_REF:$GITHUB_REF"
      - uses: iqlusioninc/laissez/.github/actions/verify-release@main
        with:
          ref: ${{ github.ref }}
          ca-pubkey: ${{ vars.LAISSEZ_CA_PUBKEY }}
          max-signature-age: 1h

The tagged commit supplies this workflow, so it does not replace the GitHub App check or a tag ruleset. Gate pull requests with the GitHub App check, not with a workflow, because a pull request can change the workflows in its own branch.