1
0
mirror of synced 2025-12-21 10:57:10 -05:00

Add CLI content to handul of articles (#19810)

* move workflow disable content to tool selector

* add cli tab to workflow articles

* seeing if this works

* add reusable

* update for each platform

* update with flags

* update with product switchers

* update with end tag

* add cli tab

* update with cli and desktop tabs

* add desktop and cli tabs

* remove tip

* get tests passing

* last small updates

* fix break

* remove break maybe

* update with download link reusable

* update with download resuable

* resolve feedback

* quotes around string

* flesh this out a bit more

* remove reusable

* update with more feedback

Co-authored-by: Meg Bird <megbird@github.com>
This commit is contained in:
Sarah Edwards
2021-07-01 06:40:44 -07:00
committed by GitHub
parent af158bc17d
commit 4b5cfca433
11 changed files with 320 additions and 90 deletions

View File

@@ -20,16 +20,11 @@ After adding a new SSH key to your {% data variables.product.product_name %} acc
{% data reusables.ssh.dsa-support %}
{% ifversion fpt or ghae or ghes %}
{% tip %}
**Tip**: You can also add an SSH key using the {% data variables.product.prodname_cli %}. For more information, see "[`gh ssh-key add`](https://cli.github.com/manual/gh_ssh-key_add)" in the {% data variables.product.prodname_cli %} documentation.
{% endtip %}
{% endif %}
{% mac %}
{% include tool-switcher %}
{% webui %}
1. Copy the SSH public key to your clipboard.
If your SSH public key file has a different name than the example code, modify the filename to match your current setup. When copying your key, don't add any newlines or whitespace.
@@ -56,10 +51,16 @@ After adding a new SSH key to your {% data variables.product.product_name %} acc
![The Add key button](/assets/images/help/settings/ssh-add-key.png)
{% data reusables.user_settings.sudo-mode-popup %}
{% endwebui %}
{% endmac %}
{% windows %}
{% include tool-switcher %}
{% webui %}
1. Copy the SSH public key to your clipboard.
If your SSH public key file has a different name than the example code, modify the filename to match your current setup. When copying your key, don't add any newlines or whitespace.
@@ -87,10 +88,15 @@ After adding a new SSH key to your {% data variables.product.product_name %} acc
8. If prompted, confirm your {% data variables.product.product_name %} password.
![Sudo mode dialog](/assets/images/help/settings/sudo_mode_popup.png)
{% endwebui %}
{% endwindows %}
{% linux %}
{% include tool-switcher %}
{% webui %}
1. Copy the SSH public key to your clipboard.
If your SSH public key file has a different name than the example code, modify the filename to match your current setup. When copying your key, don't add any newlines or whitespace.
@@ -121,8 +127,28 @@ After adding a new SSH key to your {% data variables.product.product_name %} acc
8. If prompted, confirm your {% data variables.product.product_name %} password.
![Sudo mode dialog](/assets/images/help/settings/sudo_mode_popup.png)
{% endwebui %}
{% endlinux %}
{% cli %}
{% data reusables.cli.download-cli %}
To add an SSH key to your GitHub account, use the `ssh-key add` subcommand.
```shell
gh ssh-key add <em>key-file</em>
```
To include a title for the new key, use the `-t` or `--title` flag.
```shell
gh ssh-key add <em>key-file</em> --title "personal laptop"
```
{% endcli %}
{% ifversion fpt %}
## Further reading