github / github/copilot-cli

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

Abierto
#4,248 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Lenguaje dominante
Shell
Estrellas
11.2k
Forks
1.9k
Merge medio
14 h 16 min
PR fusionados (30 d)
6

Descripción

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:
    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:
    git remote set-url origin git@github-personal:OWNER/REPO.git
    
  3. Verify the repository is accessible:
    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

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Línea de trabajo

Empieza por la validación del repositorio y el manejo de la URL remota del comando /pr. Reproduce el fallo con el alias SSH github-personal y compáralo con la comprobación exitosa de gh repo view; el trabajo estará terminado cuando /pr acepte alias que se resuelvan a hosts de GitHub y conserve la compatibilidad normal con GitHub Enterprise.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Stack tecnológico
git, github
Área
cli
Tipo de issue
Error
Dificultad
3/5
Tiempo estimado
1-2 días
Estado de actividad
Tranquilo
Claridad
Bastante claro
Aptitud para principiantes
58/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.