Skip to content

Add a command to expose the auth token directly #6277

@anglinb

Description

@anglinb

Describe the feature or problem you’d like to solve

There are many instance when I quickly get a token (Ex: Authenticating with package registries, quickly cloning something on a remote machine, etc). The cli is the perfect place to allow developers to mint variable length tokens.

Right now, I open vim and copy the token from hosts.yml when I need it.

Proposed solution

gh auth token which returns the current token

Additionally, the command could take parameters like --repo, --expiration or --scopes to allow the token to be quickly scoped down to only required permissions.

Additional context

Add any other context like screenshots or mockups are helpful, if applicable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLIhelp wantedContributions welcome

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions