HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

gh ssh-key — Manage GitHub SSH keys. More information: <https://cli.github.com/manual/gh_ssh-key>.

Submitted by: @import:tldr-pages··
0
Viewed 0 times
keyscommandsshgithubclimanagemoregh ssh-key

Problem

How to use the gh ssh-key command: Manage GitHub SSH keys. More information: <https://cli.github.com/manual/gh_ssh-key>.

Solution

gh ssh-key — Manage GitHub SSH keys. More information: <https://cli.github.com/manual/gh_ssh-key>.

List SSH keys for the currently authenticated user:
gh ssh-key {{[ls|list]}}


Add an SSH key to the currently authenticated user's account:
gh ssh-key add {{path/to/key.pub}}


Add an SSH key to the currently authenticated user's account with a specific title:
gh ssh-key add {{[-t|--title]}} {{title}} {{path/to/key.pub}}


Display help:
gh ssh-key

Code Snippets

List SSH keys for the currently authenticated user

gh ssh-key {{[ls|list]}}

Add an SSH key to the currently authenticated user's account

gh ssh-key add {{path/to/key.pub}}

Add an SSH key to the currently authenticated user's account with a specific title

gh ssh-key add {{[-t|--title]}} {{title}} {{path/to/key.pub}}

Display help

gh ssh-key

Context

tldr-pages: common/gh ssh-key

Revisions (0)

No revisions yet.