Created
March 13, 2023 21:50
-
-
Save jimbo8098/e8ba48effd17d3049d84b4a8a9de4602 to your computer and use it in GitHub Desktop.
A small login script which uses the Github CLI to log into GHCR instead of conventional tokens which must be made on the site.
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
#Install Github CLI | |
# Set the scopes used for the token | |
gh auth login -s read:packages,write:packages,delete:packages | |
# Read the token in and use it in the docker login call | |
gh auth token | docker login ghcr.io -u username --password-stdin |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment