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
{{ message }}
Repository navigation
fix: configure_gh_for_ghe.sh should unset stale GH_HOST on github.com #24217
When configure_gh_for_ghe.sh detects the host is github.com, it returns early without unsetting GH_HOST:
if [ "$github_host"="github.com" ];thenecho"Using public GitHub (github.com) - no additional gh configuration needed"return 0 # ← exits without touching GH_HOSTfi
If GH_HOST was already set in the environment (by a prior step, runner config, or stale state), the early return leaves the stale value in place. When gh pr checkout runs later, it fails with:
none of the git remotes configured for this repository correspond to the GH_HOST environment variable
configure_gh_for_ghe.sh assumes that for github.com, GH_HOST is either unset or correct. But if it has a stale/wrong value, the script does nothing to correct it.
Proposed fix
For github.com, explicitly unset GH_HOST (or set it to github.com) to prevent stale values from breaking downstream gh CLI commands:
if [ "$github_host"="github.com" ];thenecho"Using public GitHub (github.com) - no additional gh configuration needed"# Clear any stale GH_HOST to prevent gh CLI mismatchesif [ -n"${GH_HOST:-}" ] && [ "${GH_HOST}"!="github.com" ];thenecho"Clearing stale GH_HOST=${GH_HOST}"echo"GH_HOST=github.com">>"$GITHUB_ENV"fireturn 0
fi
Files to modify
actions/setup/sh/configure_gh_for_ghe.sh — Add GH_HOST cleanup for github.com path
Activity
fix: clear stale GH_HOST and remove false fork PR detection
fix: Clear stale GH_HOST and remove false fork PR detection (github#2…