`/pr` does not recognize GitHub repositories that use SSH host aliases
まだ誰も着手していません。
- 主要言語
- Shell
- スター
- 11.2k
- フォーク
- 1.9k
- 平均マージ
- 14時間 16分
- マージ済み PR(30日)
- 6
説明
Describe the bug
When using Copilot CLI's /pr command in a repository whose origin remote uses an SSH host alias (defined in ~/.ssh/config), the command fails with:
The
/prcommand requires a repository connected to GitHub (github.com or *.ghe.com remote).
For example, my remote is:
git@github-personal:nickcoffey/PySwap.git
where github-personal is an SSH alias that resolves to github.com and uses a specific SSH key for one of multiple GitHub accounts.
The repository is a valid GitHub repository, and GitHub CLI recognizes it correctly (gh repo view succeeds). This suggests /pr is validating the literal remote hostname instead of resolving SSH aliases or using Git/GitHub metadata to determine the repository.
Affected version
GitHub Copilot CLI 1.0.73.
Steps to reproduce the behavior
- Configure an SSH host alias in
~/.ssh/configthat resolves togithub.com, for example:Host github-personal HostName github.com User git IdentityFile ~/.ssh/id_ed25519_personal - Clone or configure a GitHub repository using the SSH alias as the remote:
git remote set-url origin git@github-personal:OWNER/REPO.git - Verify the repository is accessible:
gh repo view # this should succeed - Run the Copilot CLI
/prcommand from the repository.
Expected behavior
/pr should work with repositories that use SSH host aliases which ultimately resolve to github.com or GitHub Enterprise hosts.
Additional context
- Operating system: macOS
- CPU architecture: ARM
- Terminal emulator: Ghostty
- Shell: zsh
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
調査の方向性
/pr コマンドのリポジトリ検証とリモート URL の処理から始めます。SSH エイリアス github-personal で失敗を再現し、成功する gh repo view のチェックと比較します。/pr が GitHub ホストに解決されるエイリアスを受け入れ、通常の GitHub Enterprise サポートを維持できれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- git, github
- 領域
- cli
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 58/100