Describe the bug
After migrating from GitHub.com to GitHub Enterprise Cloud with data residency (<tenant>.ghe.com), an existing GitHub Actions release workflow fails because gh does not recognise the repository's remote as a known GitHub host.
The workflow supplies GH_TOKEN using secrets.GITHUB_TOKEN:
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: gh release create "${TAG}" --generate-notes
The checkout's remote points to https://<tenant>.ghe.com/<owner>/<repo>, but gh release create asks me to run gh auth login.
Explicitly setting the repository fixes the problem:
env:
GH_REPO: ${{ github.server_url }}/${{ github.repository }}
Affected version
gh version 2.98.0 (2026-08-20)
Steps to reproduce the behavior
- Use a repository on GitHub Enterprise Cloud with data residency (
<tenant>.ghe.com).
- Run the following workflow by pushing a version tag.
- Observe that the
gh release create step fails.
name: Release
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
permissions: {}
jobs:
gh-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
TAG: ${{ github.ref_name }}
run: gh release create "${TAG}" --generate-notes
Expected vs actual behavior
Expected: gh recognises the *.ghe.com remote as a GitHub host, infers the repository from the checkout, and creates the release using GH_TOKEN, without requiring GH_HOST, GH_REPO, or an interactive login.
Actual: remote resolution fails with the error below. The same workflow worked on GitHub.com, and explicitly setting GH_REPO makes it work on the data-residency instance.
Logs
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`
Describe the bug
After migrating from GitHub.com to GitHub Enterprise Cloud with data residency (
<tenant>.ghe.com), an existing GitHub Actions release workflow fails becauseghdoes not recognise the repository's remote as a known GitHub host.The workflow supplies
GH_TOKENusingsecrets.GITHUB_TOKEN:The checkout's remote points to
https://<tenant>.ghe.com/<owner>/<repo>, butgh release createasks me to rungh auth login.Explicitly setting the repository fixes the problem:
Affected version
gh version 2.98.0 (2026-08-20)Steps to reproduce the behavior
<tenant>.ghe.com).gh release createstep fails.Expected vs actual behavior
Expected:
ghrecognises the*.ghe.comremote as a GitHub host, infers the repository from the checkout, and creates the release usingGH_TOKEN, without requiringGH_HOST,GH_REPO, or an interactive login.Actual: remote resolution fails with the error below. The same workflow worked on GitHub.com, and explicitly setting
GH_REPOmakes it work on the data-residency instance.Logs