Tetap teratur dengan koleksi
Simpan dan kategorikan konten berdasarkan preferensi Anda.
Pelajari langkah-langkah pemecahan masalah yang mungkin berguna jika Anda mengalami
masalah saat mengelola image container di Artifact Registry.
Tidak dapat mengambil image atau men-deploy ke Google Cloud lingkungan runtime
Periksa hal-hal berikut:
Pastikan jalur lengkap image yang Anda kirim sudah benar. Jalur harus menyertakan nama host registry, Google Cloud, project ID, repositori, dan image. Contoh:
Untuk akun layanan Compute Engine, Cloud Run, dan Google Kubernetes Engine,
Anda harus memberikan peran Pembaca Artifact Registry
(roles/artifactregistry.reader) ke akun layanan runtime.
Untuk akun layanan Cloud Build, Anda harus memberikan peran Artifact Registry Writer (roles/artifactregistry.writer) ke akun layanan yang menjalankan build.
Jika menggunakan Docker atau alat pihak ketiga lainnya, Anda harus:
Berikan izin ke akun yang berinteraksi dengan repositori.
Konfigurasikan klien untuk mengautentikasi ke repositori.
Pastikan repositori ada. Tidak seperti Container Registry,
pembuatan repositori adalah operasi terpisah dari pengiriman image pertama. Jika repositori tidak ada, buat repositori tersebut.
Pastikan jalur lengkap image yang Anda kirim sudah benar. Jalur
harus menyertakan nama host registry, Google Cloud project ID,
repositori, dan image. Contoh:
Setiap repositori Artifact Registry adalah resource terpisah, sehingga Anda tidak dapat mendorong
image ke jalur tanpa repositori. Misalnya,
us-west1-docker.pkg.dev/my-project/my-image:v1 adalah
jalur gambar yang tidak valid.
Untuk akun layanan Compute Engine, Cloud Run, dan Google Kubernetes Engine,
Anda harus memberikan peran Artifact Registry Writer
(roles/artifactregistry.writer) ke akun layanan
runtime.
Untuk akun layanan Cloud Build, Anda harus memberikan peran Artifact Registry Writer (roles/artifactregistry.writer) ke akun layanan yang menjalankan build.
Jika Artifact Registry menampilkan pesan The repository has
enabled tag immutability, immutability tag akan dikonfigurasi untuk repositori. Anda tidak dapat mendorong gambar dengan tag yang sudah digunakan untuk
versi lain dari gambar yang sama di repositori. Coba kirim ulang gambar
dengan tag yang tidak digunakan oleh versi gambar lain yang disimpan.
Untuk memverifikasi bahwa repositori dikonfigurasi untuk tag image yang tidak dapat diubah, periksa
kolom Immutable image tags dalam daftar repositori di
konsol Google Cloud atau jalankan perintah berikut:
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Sulit dipahami","hardToUnderstand","thumb-down"],["Informasi atau kode contoh salah","incorrectInformationOrSampleCode","thumb-down"],["Informasi/contoh yang saya butuhkan tidak ada","missingTheInformationSamplesINeed","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-09-02 UTC."],[[["\u003cp\u003eThis page provides troubleshooting steps for managing container images in Artifact Registry, specifically addressing issues related to pulling and pushing images.\u003c/p\u003e\n"],["\u003cp\u003eWhen encountering problems pulling an image, ensure the image path is correct and that the pulling account has the necessary Artifact Registry Reader permissions.\u003c/p\u003e\n"],["\u003cp\u003eIf you are unable to push an image, confirm that the repository exists, the image path is correct, and the account has the appropriate Artifact Registry Writer permissions.\u003c/p\u003e\n"],["\u003cp\u003eTag immutability, when enabled, prevents pushing images with tags already in use by other versions of the same image, and checking the repository's configuration can help to fix this.\u003c/p\u003e\n"],["\u003cp\u003eIf you encounter \u003ccode\u003eImagePullBackOff\u003c/code\u003e or \u003ccode\u003eErrImagePull\u003c/code\u003e messages, you need to check the required permissions and then review the troubleshooting steps in the GKE documentation.\u003c/p\u003e\n"]]],[],null,["# Troubleshoot container image issues\n\nLearn about troubleshooting steps that you might find helpful if you run into\nproblems managing container images in Artifact Registry.\n\n### Cannot pull an image or deploy to a Google Cloud runtime environment\n\nCheck the following:\n\n1. Verify that the full path of the image that you are pushing is correct. The path must include the registry hostname, Google Cloud, project ID, repository, and image. For example: \n\n us-west1-docker.pkg.dev/my-project/my-repo/my-image:v1\n\n For more information, see [Repository and image names](/artifact-registry/docs/docker/names).\n2. Verify that the account that is pulling the image has the correct [permissions](/artifact-registry/docs/access-control) to read from the repository. If you have [disabled automatic role granting to service accounts](/resource-manager/docs/organization-policy/restricting-service-accounts#disable_service_account_default_grants), then you must grant Artifact Registry roles to the runtime service accounts.\n - For Compute Engine, Cloud Run, and Google Kubernetes Engine service accounts, you must grant the Artifact Registry Reader role (`roles/artifactregistry.reader`) to the runtime service account.\n - For your Cloud Build service account, you must grant the Artifact Registry Writer role (`roles/artifactregistry.writer`) to the service account that runs builds.\n - If you are using Docker or another third-party tool, you must:\n - [Grant permissions](/artifact-registry/docs/access-control#grant) to the account that interacts with the repository.\n - Configure the client to authenticate to the repository.\n - [Docker authentication](/artifact-registry/docs/docker/authentication) instructions\n - [Troubleshooting containerd node images on Google Kubernetes Engine](/artifact-registry/docs/integrate-gke#troubleshooting_containerd_node_images)\n\n### Cannot push an image to Artifact Registry\n\nTry the following:\n\n1. Verify that the repository exists. Unlike Container Registry, repository creation is a separate operation from pushing the first image. If the repository does not exist, then [create](/artifact-registry/docs/repositories/create-repos) it.\n2. Verify that the full path of the image that you are pushing is correct. The path must include the registry hostname, Google Cloud project ID, repository, and image. For example: \n\n us-west1-docker.pkg.dev/my-project/my-repo/my-image:v1\n \n Each Artifact Registry repository is a separate resource, so you cannot push\n an image to a path without a repository. For example,\n `us-west1-docker.pkg.dev/my-project/my-image:v1` is an\n invalid image path.\n\n For more information, see\n [Repository and image names](/artifact-registry/docs/docker/names).\n3. Verify that the account that is pushing the image has [permissions](/artifact-registry/docs/access-control) to write to the repository. If you have [disabled automatic role granting to service accounts](/resource-manager/docs/organization-policy/restricting-service-accounts#disable_service_account_default_grants), then you must grant Artifact Registry roles to the runtime service accounts.\n - For Compute Engine, Cloud Run, and Google Kubernetes Engine service accounts, you must grant the Artifact Registry Writer role (`roles/artifactregistry.writer`) to the runtime service account.\n - For your Cloud Build service account, you must grant the Artifact Registry Writer role (`roles/artifactregistry.writer`) to the service account that runs builds.\n4. If Artifact Registry returned the message `The repository has\n enabled tag immutability`, then tag immutability is configured for the repository. You cannot push an image with a tag that is already used for another version of the same image in the repository. Try to push the image again with a tag that is not used by other stored versions of the image.\n\n To verify that the a repository is configured for immutable image tags, check\n the **Immutable image tags** column in the list of repositories in\n Google Cloud console or run the following command: \n\n ```\n gcloud artifacts repositories describe REPOSITORY \\\n --project=PROJECT-ID \\\n --location=LOCATION\n \n ```\n\n### ImagePullBackOff and ErrImagePull messages\n\nMessages with `ImagePullBackOff` and `ErrImagePull` indicate that an image\ncannot be pulled from the registry by GKE.\n\n- Verify the [requirements](/artifact-registry/docs/integrate-gke#permissions) to pull from Artifact Registry.\n- Review [Troubleshoot image pulls](/kubernetes-engine/docs/troubleshooting/image-pulls) in the GKE documentation."]]