`/pr` does not recognize GitHub repositories that use SSH host aliases
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
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
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu từ việc xác thực repository và xử lý URL remote của lệnh /pr. Tái hiện lỗi với SSH alias github-personal và so sánh với kiểm tra thành công bằng gh repo view; hoàn tất khi /pr chấp nhận các alias phân giải tới các host GitHub mà vẫn duy trì hỗ trợ GitHub Enterprise thông thường.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- git, github
- Lĩnh vực
- cli
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 58/100