Skip to content

SSH key management #1755

@ludwiktrammer

Description

@ludwiktrammer

Add the ability to manage SSH keys (https://github.com/settings/keys) via the CLI. This would allow users to set up a repository via SSH entirely from CLI.

In our organization, we provide instructional materials for our developers on how to set up a repository, including setting up an ssh key. It would be great to be able to simply post a set of commands, instead of the current GUI instructions to "click here, and then click there".

Proposed solution

Add a gh ssh-key command (or maybe gh key ssh?) with the following subcommands:

  • list - lists currently added keys with their names and hashes
  • add [<filename>] - adds a new key provided by the optional argument filename (which defaults to the current ssh public key, i.e. ~/.ssh/id_rsa.pub)
  • remove <hash> - removes the key given by the argument hash

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIneeds-designAn engineering task needs design to proceed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions