Problem
gh pr create fails when GH_HOST is set to a proxy host but the git remote uses github.com.
Command
gh pr create --draft --title "..." --head feature/145-packages-interfaces-tests --base main --body "..."
Error
none of the git remotes configured for this repository correspond to the GH_HOST environment variable. Try adding a matching remote or unsetting the variable
Context
- Repository:
credfeto/credfeto-dotnet-repo-tools
- Git remote:
git@github.com:credfeto/credfeto-dotnet-repo-tools.git
GH_HOST: github-api.markridgwell.com
The gh CLI refuses to create the PR because the git remote uses github.com but GH_HOST is the proxy. Other gh commands (gh issue view, gh issue edit, gh issue comment) work correctly when --repo is specified.
Problem
gh pr createfails whenGH_HOSTis set to a proxy host but the git remote usesgithub.com.Command
Error
Context
credfeto/credfeto-dotnet-repo-toolsgit@github.com:credfeto/credfeto-dotnet-repo-tools.gitGH_HOST:github-api.markridgwell.comThe
ghCLI refuses to create the PR because the git remote usesgithub.combutGH_HOSTis the proxy. Otherghcommands (gh issue view,gh issue edit,gh issue comment) work correctly when--repois specified.