This version of GitHub Enterprise will be discontinued on
This version of GitHub Enterprise was discontinued on
2020-05-23.
No patch releases will be made, even for critical security issues. For better performance, improved security, and new features, upgrade to the latest version of GitHub Enterprise.
For help with the upgrade, contact GitHub Enterprise support.
If you're using a GPG key that matches your committer identity and your verified email address associated with your GitHub Enterprise account, then you can begin signing commits and signing tags.
If you don't have a GPG key that matches your committer identity, you need to associate an email with an existing key. For more information, see "Associating an email with your GPG key".
If you have multiple GPG keys, you need to tell Git which one to use.
Open TerminalTerminalGit Bash.
Use the gpg --list-secret-keys --keyid-format LONG command to list GPG keys for which you have both a public and private key. A private key is required for signing commits or tags.
$ gpg --list-secret-keys --keyid-format LONG
Note: Some GPG installations on Linux may require you to use gpg2 --list-keys --keyid-format LONG to view a list of your existing keys instead. In this case you will also need to configure Git to use gpg2 by running git config --global gpg.program gpg2.
From the list of GPG keys, copy the GPG key ID you'd like to use. In this example, the GPG key ID is 3AA5C34371567BD2:
To set your GPG signing key in Git, paste the text below, substituting in the GPG key ID you'd like to use. In this example, the GPG key ID is 3AA5C34371567BD2:
In Git 2.18 or earlier, use the git config gpg.program command:
To use S/MIME to sign for all repositories:
$ git config --global gpg.program smimesign
To use S/MIME to sign for a single repository:
$ cd /path/to/my/repository
$ git config --local gpg.program smimesign
If you're using an X.509 key that matches your committer identity, you can begin signing commits and tags.
If you're not using an X.509 key that matches your commiter identity, list X.509 keys for which you have both a certificate and private key using the smimesign --list-keys command.
$ smimesign --list-keys
From the list of X.509 keys, copy the certificate ID of the X.509 key you'd like to use. In this example, the certificate ID is 0ff455a2708394633e4bb2f88002e3cd80cbd76f:
If you're using a GPG key that matches your committer identity and your verified email address associated with your GitHub Enterprise account, then you can begin signing commits and signing tags.
If you don't have a GPG key that matches your committer identity, you need to associate an email with an existing key. For more information, see "Associating an email with your GPG key".
If you have multiple GPG keys, you need to tell Git which one to use.
Open TerminalTerminalGit Bash.
Use the gpg --list-secret-keys --keyid-format LONG command to list GPG keys for which you have both a public and private key. A private key is required for signing commits or tags.
$ gpg --list-secret-keys --keyid-format LONG
Note: Some GPG installations on Linux may require you to use gpg2 --list-keys --keyid-format LONG to view a list of your existing keys instead. In this case you will also need to configure Git to use gpg2 by running git config --global gpg.program gpg2.
From the list of GPG keys, copy the GPG key ID you'd like to use. In this example, the GPG key ID is 3AA5C34371567BD2:
To set your GPG signing key in Git, paste the text below, substituting in the GPG key ID you'd like to use. In this example, the GPG key ID is 3AA5C34371567BD2:
In Git 2.18 or earlier, use the git config gpg.program command:
To use S/MIME to sign for all repositories:
$ git config --global gpg.program smimesign
To use S/MIME to sign for a single repository:
$ cd /path/to/my/repository
$ git config --local gpg.program smimesign
If you're using an X.509 key that matches your committer identity, you can begin signing commits and tags.
If you're not using an X.509 key that matches your commiter identity, list X.509 keys for which you have both a certificate and private key using the smimesign --list-keys command.
$ smimesign --list-keys
From the list of X.509 keys, copy the certificate ID of the X.509 key you'd like to use. In this example, the certificate ID is 0ff455a2708394633e4bb2f88002e3cd80cbd76f:
To use your X.509 key to sign for a single repository:
$ cd /path/to/my/repository
$ git config --local user.signingkey 0ff455a2708394633e4bb2f88002e3cd80cbd76f
Note: X.509 keys are not supported on Linux. You can configure gpgsm to provide encryption and signing services, however, this is not currently supported by GitHub Enterprise. For more information, see the gpgsm topic in the GnuPG documentation.
If you're using a GPG key that matches your committer identity and your verified email address associated with your GitHub Enterprise account, then you can begin signing commits and signing tags.
If you don't have a GPG key that matches your committer identity, you need to associate an email with an existing key. For more information, see "Associating an email with your GPG key".
If you have multiple GPG keys, you need to tell Git which one to use.
Open TerminalTerminalGit Bash.
Use the gpg --list-secret-keys --keyid-format LONG command to list GPG keys for which you have both a public and private key. A private key is required for signing commits or tags.
$ gpg --list-secret-keys --keyid-format LONG
Note: Some GPG installations on Linux may require you to use gpg2 --list-keys --keyid-format LONG to view a list of your existing keys instead. In this case you will also need to configure Git to use gpg2 by running git config --global gpg.program gpg2.
From the list of GPG keys, copy the GPG key ID you'd like to use. In this example, the GPG key ID is 3AA5C34371567BD2:
To set your GPG signing key in Git, paste the text below, substituting in the GPG key ID you'd like to use. In this example, the GPG key ID is 3AA5C34371567BD2: