Skip to content

Adding your SSH key to the ssh-agent instructions are incorrect #23512

@simonw

Description

@simonw

Code of Conduct

What article on docs.github.com is affected?

https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

This bit:

Host *.{% ifversion ghes or ghae %}HOSTNAME{% else %}github.com{% endif %}

What part(s) of the article would you like to see updated?

The instructions say that you should edit ~/.ssh/config and add this to it:

Host *.github.com
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519

I tried that, but when I ran git clone git@github.com:simonw/sqlite-utils I still had to enter my password.

When I changed it to this my command worked correctly as expected, without asking for my password:

Host github.com
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    contentThis issue or pull request belongs to the Docs Content team

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions