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
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-keycommand (or maybegh key ssh?) with the following subcommands:list- lists currently added keys with their names and hashesadd [<filename>]- adds a new key provided by the optional argumentfilename(which defaults to the current ssh public key, i.e.~/.ssh/id_rsa.pub)remove <hash>- removes the key given by the argumenthash