github / github/copilot-cli

`/pr` does not recognize GitHub repositories that use SSH host aliases

Ouverte
#4,248 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Shell
Étoiles
11.2k
Forks
1.9k
Merge moyen
14 h 16 min
PR mergées (30 j)
6

Description

### 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 `/pr` command 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

1. Configure an SSH host alias in `~/.ssh/config` that resolves to `github.com`, for example:
```sshconfig
Host github-personal
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519_personal
```
2. Clone or configure a GitHub repository using the SSH alias as the remote:
```bash
git remote set-url origin git@github-personal:OWNER/REPO.git
```
3. Verify the repository is accessible:
```bash
gh repo view # this should succeed
```
4. Run the Copilot CLI `/pr` command 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

Guide de contribution

Ouvrir le guide de contribution

Piste de recherche

Commencez par la validation du dépôt et la gestion de l’URL distante de la commande `/pr`. Reproduisez l’échec avec l’alias SSH `github-personal` et comparez-le à la vérification réussie de `gh repo view` ; le travail est terminé lorsque `/pr` accepte les alias se résolvant vers des hôtes GitHub tout en conservant la prise en charge normale de GitHub Enterprise.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
git, github
Domaine
cli
Type d'issue
Bug
Difficulté
3/5
Temps estimé
1-2 jours
Activité
Calme
Clarté
Plutôt claire
Accessibilité débutants
58/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.