You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Pick a for your account and change the origin remote to git@github-enterprise:<org>/<repo>.git
Attempt to use gh on the repo with the modified remote
Expected vs actual behavior
When running a gh pr checkout <PR number> it fails with the following message:
could not determine base repo: none of the git remotes configured for this repository point to a known GitHub host. To tell gh about a new GitHub host, please use `gh auth login`
I've tried to re-auth, but the issue remains. I've also tried to add github-enterprise as a GH host, but that didn't work either and I feel silly for having tried it.
I expected the same behaviour as with a remote pointing to github.com.
@medecau Thanks for writing in. Right now our parsing of SSH config files is basic and does not handle wildcard characters such as *. To work around this limitation I would suggest that you add the Hostname field to each individual Host entry. Please let me know if that works for you.
Activity
samcoe commentedon Oct 20, 2022
@medecau Thanks for writing in. Right now our parsing of SSH config files is basic and does not handle wildcard characters such as
*. To work around this limitation I would suggest that you add theHostnamefield to each individualHostentry. Please let me know if that works for you.medecau commentedon Oct 27, 2022
Yes, adding
Hostname github.comto each individual Host entry resolves this issue.Thank you @samcoe.