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
gh stack submit exits with an error when the git remote URL uses a custom SSH host alias (e.g. github.com-work) instead of the literal github.com hostname. There is no flag to override the repository, so submit is unusable in this configuration.
Steps to reproduce
Configure ~/.ssh/config with a host alias (common for multi-account setups):
Host github.com-work
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519_work
Clone using the alias:
git clone git@github.com-work:org/repo.git
cd repo
✗ failed to create GitHub client: determining repository: unable to determine current
repository, none of the git remotes configured for this repository point to a known
GitHub host
The --remote origin flag and GH_HOST=github.com env var do not help — the error
is identical with both.
Expected result
gh stack submit pushes the branches and opens draft PRs, the same as it would with a git@github.com:org/repo.git remote.
What I tried
gh stack submit --remote origin — same error
GH_HOST=github.com gh stack submit — same error
GH_REPO=org/repo gh stack submit — gets past host detection, but then pushes to git@github.com:org/repo.git instead of the configured alias, so the push fails
with a key-agent rejection
Workaround
Push branches manually and create PRs one at a time:
gh stack submitexits with an error when the git remote URL uses a custom SSH host alias (e.g.github.com-work) instead of the literalgithub.comhostname. There is no flag to override the repository, sosubmitis unusable in this configuration.Steps to reproduce
Configure
~/.ssh/configwith a host alias (common for multi-account setups):Clone using the alias:
git remote get-url origin→git@github.com-work:org/repo.gitInitialize a stack and submit:
Actual result
The
--remote originflag andGH_HOST=github.comenv var do not help — the erroris identical with both.
Expected result
gh stack submitpushes the branches and opens draft PRs, the same as it would with agit@github.com:org/repo.gitremote.What I tried
gh stack submit --remote origin— same errorGH_HOST=github.com gh stack submit— same errorGH_REPO=org/repo gh stack submit— gets past host detection, but then pushes togit@github.com:org/repo.gitinstead of the configured alias, so the push failswith a key-agent rejection
Workaround
Push branches manually and create PRs one at a time:
Environment