Skip to content

Instantly share code, notes, and snippets.

View crguezl's full-sized avatar
🌋

Casiano Rodriguez-Leon crguezl

🌋
View GitHub Profile
@philip-gai
philip-gai / update_githubtoken.sh
Created February 7, 2022 22:14
Update GITHUB_TOKEN in Codespace to work for multiple repositories
# 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"