# Verify a signed change on GitHub

[Read this guide on KeySigner](https://keysigner.io/integrations/guides/verify-a-github-commit/)

Approve a test commit on your phone, then check that GitHub marks the same commit as verified.

## Before you start

**Computer tools and KeySigner on iPhone**

- Pair the KeySigner computer tools with the phone and add the public key to GitHub as a signing key. Use a test repository to check the signature in Git and on GitHub.

## Data and access

- **Shared or checked**. KeySigner signs the test commit. GitHub receives the signed commit when you push and checks the signature against its record of the signing key.
- **Check separately**. Repository push access, branch rules, and unsigned older commits each need their own check.

## 1. Prepare a test repository

Pair your desktop with KeySigner and choose a test signing key. In a terminal, run keysigner-agent setup-git to preview which Git settings will change before applying it.

**Check.** The terminal preview identifies the test signing key and lists the current and proposed Git settings.

## 2. Register the signing key

Add the public key to the test GitHub account as a signing key. Apply the desktop setup with keysigner-agent setup-git --apply only after reviewing the settings it will change.

**Check.** GitHub lists the public key as a signing key. The settings you apply match the preview.

## 3. Approve and verify a test commit

Make a signed test commit. On your phone, check the subject, author and full message before approving. Push the commit to the scratch repository and open GitHub’s verification details.

**Check.** The test commit on GitHub shows Verified. Open the verification details and match the commit ID to the commit you just pushed.

![KeySigner shows the commit author, message and Approved and signed status.](https://keysigner.io/integrations/guides/verify-a-github-commit/keysigner-commit-approval.png)

A completed test approval in the KeySigner iPhone simulator.

## Check your result

Compare the commit and signing identity in GitHub with the approval on your phone. To restore your local settings, run keysigner-agent rollback git. Remove the test key from GitHub separately.

[How to verify your setup](https://keysigner.io/integrations/verify-a-setup/)

## If you get stuck

### GitHub shows the commit as unverified

Compare the public key shown by keysigner-agent keys with the signing key registered in the GitHub account. Check that the commit’s committer email is verified on that account. Run git verify-commit locally to isolate signature generation from GitHub verification.

## Tools in this guide

- [GitHub](https://keysigner.io/integrations/github/)
  - [Check commit and tag signature verification](https://docs.github.com/en/authentication/troubleshooting-commit-signature-verification/checking-your-commit-and-tag-signature-verification-status)
  - [Troubleshoot a commit signature](https://docs.github.com/en/authentication/troubleshooting-commit-signature-verification)
  - [Set up authenticator codes for GitHub](https://docs.github.com/en/authentication/securing-your-account-with-two-factor-authentication-2fa/configuring-two-factor-authentication#configuring-two-factor-authentication-using-a-totp-app)
  - [Setup requirements](https://keysigner.io/integrations/setup-requirements/#github)

[More guides for this task](https://keysigner.io/integrations/tasks/review-code-and-releases/)
