[BUG] /install-github-app command hangs when using SSH config with custom GitHub hosts
Claude CLI Bug Report
Environment
- Platform (select one):
- [X] Anthropic API
- Claude CLI version: v1.0.44
- Operating System: MacOS 15.5
- Terminal: PyCharm / WebStorm Integrated Environment
Bug Description
I am handling multiple GitHub access using ~/.ssh/config, and having suffix user to support different SSH connection such as git@github.com-identifier:workspace/repo.git
When I run /install-github-app, it will stuck at "Enter a different repository", nothing happen when I enter and press enter. It works fully when I manually change my git remote to git@github.com:workspace/repo.git
I confirm I have login gh auth login with my specified account, but no luck.
SSH Config:
Host github.com-identifier
HostName github.com
User git
IdentityFile ~/.ssh/identifier
Steps to Reproduce
- Set up SSH config with custom host identifier (e.g.,
github.com-identifier) - Configure git remote to use the custom host:
git@github.com-identifier:workspace/repo.git - Authenticate with GitHub CLI using
gh auth login - Run Claude CLI command
/install-github-app - When prompted to "Enter a different repository", input the repository name
- Press Enter - nothing happens, command hangs
Expected Behavior
- Claude CLI should properly parse and handle SSH remotes with custom host identifiers
- The
/install-github-appcommand should proceed normally after entering the repository name - The installation should work with the existing SSH configuration without requiring manual remote URL changes
Actual Behavior
- The command hangs after entering a repository name at the "Enter a different repository" prompt
- No error messages are displayed
- The only workaround is to manually change the git remote from
git@github.com-identifier:workspace/repo.gittogit@github.com:workspace/repo.git
Additional Context
- This issue appears to be related to how Claude CLI parses SSH remote URLs with custom host identifiers
- The GitHub CLI (
gh) authentication works correctly with the same setup - The SSH configuration is valid and works for normal git operations
- This is a common setup for developers managing multiple GitHub accounts or organizations
Workaround:
Temporarily change git remote before running Claude CLI commands:
git remote set-url origin git@github.com:workspace/repo.git
# Run Claude CLI commands
git remote set-url origin git@github.com-identifier:workspace/repo.git
Potential Fix:
Claude CLI should parse SSH remote URLs more robustly to handle custom host identifiers in SSH config, similar to how standard git operations handle them.
This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗