Merge branch 'main' into repo-sync
This commit is contained in:
@@ -28,11 +28,11 @@ topics:
|
||||
{% data reusables.command_line.open_the_multi_os_terminal %}
|
||||
3. Generate a GPG key pair. Since there are multiple versions of GPG, you may need to consult the relevant [_man page_](https://en.wikipedia.org/wiki/Man_page) to find the appropriate key generation command. Your key must use RSA.
|
||||
- If you are on version 2.1.17 or greater, paste the text below to generate a GPG key pair.
|
||||
```shell
|
||||
```shell{:copy}
|
||||
$ gpg --full-generate-key
|
||||
```
|
||||
- If you are not on version 2.1.17 or greater, the `gpg --full-generate-key` command doesn't work. Paste the text below and skip to step 6.
|
||||
```shell
|
||||
```shell{:copy}
|
||||
$ gpg --default-new-key-algo rsa4096 --gen-key
|
||||
```
|
||||
4. At the prompt, specify the kind of key you want, or press `Enter` to accept the default.
|
||||
@@ -51,10 +51,10 @@ topics:
|
||||
{% data reusables.gpg.list-keys-with-note %}
|
||||
{% data reusables.gpg.copy-gpg-key-id %}
|
||||
10. Paste the text below, substituting in the GPG key ID you'd like to use. In this example, the GPG key ID is `3AA5C34371567BD2`:
|
||||
```shell
|
||||
$ gpg --armor --export <em>3AA5C34371567BD2</em>
|
||||
# Prints the GPG key ID, in ASCII armor format
|
||||
```
|
||||
```shell{:copy}
|
||||
$ gpg --armor --export <em>3AA5C34371567BD2</em>
|
||||
# Prints the GPG key ID, in ASCII armor format
|
||||
```
|
||||
11. Copy your GPG key, beginning with `-----BEGIN PGP PUBLIC KEY BLOCK-----` and ending with `-----END PGP PUBLIC KEY BLOCK-----`.
|
||||
12. [Add the GPG key to your GitHub account](/articles/adding-a-gpg-key-to-your-github-account).
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
1. From the list of GPG keys, copy the long form of the GPG key ID you'd like to use. In this example, the GPG key ID is `3AA5C34371567BD2`:
|
||||
```shell
|
||||
```shell{:copy}
|
||||
$ gpg --list-secret-keys --keyid-format=long
|
||||
/Users/hubot/.gnupg/secring.gpg
|
||||
------------------------------------
|
||||
sec 4096R/<em>3AA5C34371567BD2</em> 2016-03-10 [expires: 2017-03-10]
|
||||
uid Hubot <hubot@example.com>
|
||||
ssb 4096R/42B317FD4BA89E7A 2016-03-10
|
||||
```
|
||||
```
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
|
||||
1. Use the `gpg --list-secret-keys --keyid-format=long` command to list the long form of the GPG keys for which you have both a public and private key. A private key is required for signing commits or tags.
|
||||
```shell
|
||||
$ gpg --list-secret-keys --keyid-format=long
|
||||
```
|
||||
{% note %}
|
||||
|
||||
**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`.
|
||||
```shell{:copy}
|
||||
$ gpg --list-secret-keys --keyid-format=long
|
||||
```
|
||||
|
||||
{% note %}
|
||||
|
||||
{% endnote %}
|
||||
**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`.
|
||||
|
||||
{% endnote %}
|
||||
|
||||
Reference in New Issue
Block a user