Skip to content

After logging in with GitHub CLI, offer to generate and/or upload user's SSH keys #2627

@mislav

Description

@mislav

If the user already has SSH keys in their ~/.ssh directory, GitHub CLI could offer to default to SSH protocol for cloning/pushing and ensure that the public SSH key is uploaded to the user's account.

If there are no local SSH keys, but the user indicates that they would still like to use SSH for authentication (e.g. if their org mandates it), we could guide the person through the process of generating a new SSH key and upload the resulting public key to the GitHub account, so that the user could be quickly up-and-running on a fresh machine. Idea by @LeonardAukea 🙇

Originally posted by @mislav in #1434 (comment)

E.g. to generate a key:

ssh-keygen -t rsa -b 4096 -C "<comment>" -N "<passphrase>" -f <file>
# then, upload `<file>.pub` to GitHub

Metadata

Metadata

Assignees

No one assigned

    Labels

    coreThis issue is not accepting PRs from outside contributorsenhancementa request to improve CLI

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions