This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# You have to unset the GITHUB_TOKEN, otherwise gh cli will use it and skip auth | |
unset GITHUB_TOKEN | |
# List of scopes: https://docs.github.com/en/developers/apps/building-oauth-apps/scopes-for-oauth-apps#available-scopes | |
gh auth login --hostname 'github.com' --scopes 'read:org,repo,read:packages' | |
token="$(gh config get -h github.com oauth_token)" | |
export GITHUB_TOKEN="$token" |
OlderNewer