Describe the bug
When running gh auth login with SSH as the preferred protocol, the CLI asks:
What title would you like to use for the SSH key?
However, if an existing SSH key is already present locally (e.g. ~/.ssh/id_ed25519) and already registered on GitHub, the CLI silently reuses that key and never uploads a new one — meaning the title the user just typed is completely discarded with no feedback.
Steps to reproduce
- Have an existing
~/.ssh/id_ed25519 key already added to your GitHub account
- Run
gh auth login
- Select
GitHub.com → SSH → authenticate via browser
- When prompted, enter a title for the SSH key
- Complete authentication
Expected behavior
Either:
- Skip the SSH key title prompt entirely if an existing key will be reused, or
- After completing auth, display a message like: "An existing SSH key was found and reused. The title you entered was not used."
Actual behavior
The title prompt is shown, the user enters a name, and it is silently discarded. No new key appears on GitHub. The user has no way of knowing their input had no effect.
Environment
Describe the bug
When running
gh auth loginwith SSH as the preferred protocol, the CLI asks:However, if an existing SSH key is already present locally (e.g.
~/.ssh/id_ed25519) and already registered on GitHub, the CLI silently reuses that key and never uploads a new one — meaning the title the user just typed is completely discarded with no feedback.Steps to reproduce
~/.ssh/id_ed25519key already added to your GitHub accountgh auth loginGitHub.com→SSH→ authenticate via browserExpected behavior
Either:
Actual behavior
The title prompt is shown, the user enters a name, and it is silently discarded. No new key appears on GitHub. The user has no way of knowing their input had no effect.
Environment