Skip to content

Remapping hostname prevents using gh stack submit #337

Closed

Description

@jeff-younker

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 "git@fastalyze.github.com:fastalyze/"]
    insteadOf = git@github.com:fastalyze/

[url "git@fastalyze.github.com: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

Activity

  1. benekuehn commented on Jul 30, 2026

    @benekuehn

    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.

  2. jessie828 commented on Aug 7, 2026

    @jessie828

    I am also suffering from this problem. The work around mentioned in #381 using the GH_REPO=.../... trick seems to also work here

  3. added
    bugBug Reports
    topic: cli - submit`gh stack submit`: remote/SSH handling, config flags, draft PRs, and submit UX or failures.
    on Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugBug Reportstopic: cli - submit`gh stack submit`: remote/SSH handling, config flags, draft PRs, and submit UX or failures.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions