Remapping hostname prevents using `gh stack submit`
I use a synthetic hostname mapping in ~/.gitconfig (1) in conjunction with my .ssh/config (2) to select the SSH host key and user identity. In this case, the synthetic hostname is fastalyze.github.com. When I run gh stack submit this happens:
gh stack submit
Checking stack state...
✗ 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
I suspect there is a check for stacked PR support based on the hostname, and it's not recognizing fastalyze.github.com.
(1) ~/.gitconfig stanza:
[url "[email protected]:fastalyze/"]
insteadOf = [email protected]:fastalyze/
[url "[email protected]:fastalyze/"]
insteadOf = https://github.com/fastalyze/
(2) .ssh/config stanza:
host fastalyze.github.com
Hostname github.com
User "jeff-younker"
IdentityFile ~/.ssh/id_fastalyze
IdentityAgent none
I opened an upstream fix in cli/go-gh#274. The root cause is in repository.Current: it translates SSH alias URLs, but continues filtering with cached repository metadata from before translation. The PR refreshes that metadata while preserving fetch/push precedence; it covers the same SSH hostname remapping path described here.
This will still need to merge and then be consumed by gh-stack before the issue is resolved.
I am also suffering from this problem. The work around mentioned in #381 using the GH_REPO=.../... trick seems to also work here