Skip to content

gh auth token command for GH_ENTERPRISE_TOKEN #7090

@natashamm

Description

@natashamm

Describe the feature or problem you’d like to solve

When I have set GH_ENTERPRISE_TOKEN and GH_HOST environmental variables and run gh auth token, I get no oauth token. I would expect it to return the token regardless of whether it is GH_TOKEN or GH_ENTERPRISE_TOKEN.

Proposed solution

gh auth token returns the token used, whether it is GH_TOKEN or GH_ENTERPRISE_TOKEN.

Other Discussion

gh auth token --hostname <hostname> does the same thing, but if you are only using GitHub Enterprise then it could become tedious to always put --hostname.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-1Affects a large population and inhibits work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions