虽然工件存储库已成功创建,但即使向我在 gcloud cli 上使用的会计授予所有工件权限后,运行 docker Push 将图像推送到 google 工件注册表也会失败并出现权限错误。
推送图片的命令:
docker push us-central1-docker.pkg.dev/project-id/repo-name:v2
Run Code Online (Sandbox Code Playgroud)
错误信息:
The push refers to repository [us-central1-docker.pkg.dev/project-id/repo-name]
6f6f4a472f31: Preparing
bc096d7549c4: Preparing
5f70bf18a086: Preparing
20bed28d4def: Preparing
2a3255c6d9fb: Preparing
3f5d38b4936d: Waiting
7be8268e2fb0: Waiting
b889a93a79dd: Waiting
9d4550089a93: Waiting
a7934564e6b9: Waiting
1b7cceb6a07c: Waiting
b274e8788e0c: Waiting
78658088978a: Waiting
denied: Permission "artifactregistry.repositories.downloadArtifacts" denied on resource "projects/project-id/locations/us-central1/repositories/repo-name" (or it may not exist)
Run Code Online (Sandbox Code Playgroud) python google-cloud-platform google-cloud-ml docker-push google-cloud-vertex-ai