Skip to content

Instantly share code, notes, and snippets.

View toddysm's full-sized avatar

Toddy Mladenov toddysm

View GitHub Profile
@toddysm
toddysm / manual-authentication-with-acr.txt
Last active June 19, 2023 01:11
Authenticating with Azure Container Registry (ACR)
# As per the instructions at https://github.com/Azure/acr/blob/main/docs/AAD-OAuth.md
# Prep: Set env variables
registry="<USE_YOUR_REGISTRY_HERE>"
tenant="<USE_YOUR_TENANT_HERE>"
subscription="<USE_YOUR_SUBSCRIPTION_HERE>"
scope="registry:catalog:*"
# Step 1: Get AAD access token
aad_access_token=`az account get-access-token --subscription $subscription --query "accessToken" --output tsv`
echo $aad_access_token
# Step 2: Get a refresh token for ACR
@toddysm
toddysm / dockerhub-registry-auth.rest
Last active January 30, 2024 05:26
Docker Hub Registry Authentication REST Requests