Skip to content

ability to print auth token #1514

@vilmibm

Description

@vilmibm

It is sometimes desirable for a user to see the token gh uses for a given host. Right now they'd need to do one of two things:

  • cat ~/.config/gh/hosts.yml
  • gh config get -h github.com oauth_token

Neither of these is perfect, so this issue covers adding something to gh auth status like:

✓ Token: *******************

and supporting a flag --show-token/-t that prints the actual token value.

I'm also imagining nontty support like this:

gh auth status -h github.com -t >mytoken.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    authrelated to tokens, authentication state, or oauthenhancementa 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