[BUG] /install-github-app command hangs when using SSH config with custom GitHub hosts

Resolved 💬 7 comments Opened Jul 10, 2025 by glendon-thegigabit Closed Jan 5, 2026

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

  1. Set up SSH config with custom host identifier (e.g., github.com-identifier)
  2. Configure git remote to use the custom host: git@github.com-identifier:workspace/repo.git
  3. Authenticate with GitHub CLI using gh auth login
  4. Run Claude CLI command /install-github-app
  5. When prompted to "Enter a different repository", input the repository name
  6. Press Enter - nothing happens, command hangs

Expected Behavior

  • Claude CLI should properly parse and handle SSH remotes with custom host identifiers
  • The /install-github-app command 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.git to git@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.

View original on GitHub ↗

This issue has 7 comments on GitHub. Read the full discussion on GitHub ↗