Skip to content

Add gh auth token#6324

Merged
vilmibm merged 2 commits intocli:trunkfrom
nsmag:auth-token
Oct 4, 2022
Merged

Add gh auth token#6324
vilmibm merged 2 commits intocli:trunkfrom
nsmag:auth-token

Conversation

@nsmag
Copy link
Contributor

@nsmag nsmag commented Sep 22, 2022

Resolves #6277

Add gh auth token for printing the oauth token. The output is the same as gh config get oauth_token -h HOSTNAME except that gh auth token can handle the default hostname.

$ gh auth token
gho_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

$ gh config get oauth_token -h github.com
gho_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

$ gh config get oauth_token
could not find key "oauth_token"

@nsmag nsmag requested a review from a team as a code owner September 22, 2022 08:58
@nsmag nsmag requested review from vilmibm and removed request for a team September 22, 2022 08:58
@cliAutomation cliAutomation added the external pull request originating outside of the CLI core team label Sep 22, 2022
@Andrysiregar

This comment was marked as spam.

Copy link
Contributor

@vilmibm vilmibm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome, thank you!

@vilmibm vilmibm enabled auto-merge October 4, 2022 19:49
@vilmibm vilmibm merged commit 4a2ca15 into cli:trunk Oct 4, 2022
@nsmag nsmag deleted the auth-token branch October 5, 2022 15:20
@Becky1876
Copy link

THX

@S1983tt
Copy link

S1983tt commented Oct 11, 2022

4a2ca15

@Underseplecher

This comment was marked as spam.

tekumara added a commit to tekumara/ghapp-dagger that referenced this pull request Nov 2, 2022
mloskot added a commit to mloskot/minikube that referenced this pull request Jan 28, 2026
Utilization of `gh auth status` to obtain the token is a legacy method,
cli/cli#2157 which was replaced with
`gh auth token` command, cli/cli#6324
medyagh pushed a commit to kubernetes/minikube that referenced this pull request Jan 30, 2026
Utilization of `gh auth status` to obtain the token is a legacy method,
cli/cli#2157 which was replaced with
`gh auth token` command, cli/cli#6324
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external pull request originating outside of the CLI core team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a command to expose the auth token directly

7 participants