Skip to content

Skip the message to generate a new SSH key #8508

Description

@5ouma

Describe the feature or problem you’d like to solve

When you log in with gh auth login, most of the options can be set via flags.
However, skipping the message generates a new SSH key is impossible.

? Generate a new SSH key to add to your GitHub account? (Y/n) 

Proposed solution

Skip that message with --skip-ssh-key flag, for example.

Additional context

With this flag, you can log in with no selection.

gh auth login -h='GitHub.com' -p='SSH' --skip-ssh-key -w

Activity

  1. added
    gh-authrelating to the gh auth command
    on Jan 31, 2024
  2. williammartin commented on Feb 23, 2024

    @williammartin
    Member

    This makes sense to me, I've marked it help wanted to open up contributions to the community. The only design thing is we'd probably want a different flag name since if you have keys on your system it's a slightly different prompt:

    Upload your SSH public key to your GitHub account?  [Use arrows to move, type to filter]
    > /Users/williammartin/.ssh/codespaces.auto.pub
      /Users/williammartin/.ssh/github_id_rsa.pub
      Skip
    

    Perhaps --skip-ssh-key?

  3. babakks commented on Apr 6, 2024

    @babakks
    Member

    @williammartin I just pushed a PR for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIgh-authrelating to the gh auth commandhelp wantedContributions welcome

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions