summary of the commands and steps I executed - until I have successfully pulled Docker images from Google Artifact Registry (GAR):
Final Outcome
You successfully pulled:
asia-southeast1-docker.pkg.dev/escian/todoapp/hello-app:1.0asia-southeast1-docker.pkg.dev/escian/booranasak-artifact-registry-docker/fastapi-app:v1
π Step-by-Step Command Summary
πΈ 1. Initial Setup Attempts
- Tried interactive login (but canceled):
gcloud auth login
gcloud init
πΈ 2. Created and Prepared Service Account
- Saved service account credentials to
escian-bb074f590610.json - Confirmed itβs the correct service account for GAR access:
"client_email": "escian-devops-artifact@escian.iam.gserviceaccount.com"
πΈ 3. Activated the Service Account
gcloud auth activate-service-account --key-file=escian-bb074f590610.json
β This set the service account as the active credential.
πΈ 4. Set GCP Project (Partial Success)
gcloud config set project escian
β οΈ Warned that Cloud Resource Manager API was disabled (can ignore for image pull).
πΈ 5. Configured Docker to Authenticate with GAR
gcloud auth configure-docker asia-southeast1-docker.pkg.dev --quiet
β This added the necessary section to
~/.docker/config.json:
{
"credHelpers": {
"asia-southeast1-docker.pkg.dev": "gcloud"
}
}
πΈ 6. Verified Docker Credential Helper
docker-credential-gcloud list
π‘ Note:
asia-southeast1-docker.pkg.devis NOT shown here β but that's expected becausedocker-credential-gclouddoesnβt show Artifact Registry entries.
πΈ 7. First Pull Attempts (Failed)
You ran:
docker pull asia-southeast1-docker.pkg.dev/escian/booranasak-artifact-registry-docker/fastapi-app:v1
β Failed with:
Unauthenticated requestβ this was before proper configuration.
πΈ 8. Final Successful Pulls
Once everything was configured:
docker pull asia-southeast1-docker.pkg.dev/escian/todoapp/hello-app:1.0
docker pull asia-southeast1-docker.pkg.dev/escian/booranasak-artifact-registry-docker/fastapi-app:v1
β Both images pulled successfully!
π§ Lessons Learned / Tips
-
gcloud auth configure-docker+gcloud auth activate-service-accountis enough if the service account has permission. -
No need for
docker loginmanually if Docker reads from~/.docker/config.jsonviacredHelpers. -
docker-credential-gcloud listdoesnβt reflect Artifact Registry β don't rely on it for GAR validation. - If all fails, use:
gcloud auth print-access-token | docker login -u oauth2accesstoken --password-stdin https://asia-southeast1-docker.pkg.dev

Top comments (0)