Skip to content

gh authentication in azure pipeline #3070

Answered by mislav
speter04 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, gh auth login --with-token is meant more as a command that you would run on your own personal machine to store a token and skip the interactive authentication. However, for automated jobs like those in Azure devops, it's more suitable to set environment variables GH_TOKEN or GITHUB_TOKEN with the value of your token. GitHub CLI will use the token from the environment over any other mode of authentication. See gh help environment

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@speter04
Comment options

Answer selected by mislav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants