Organiza tus páginas con colecciones
Guarda y categoriza el contenido según tus preferencias.
En esta página, se describe cómo acceder a Docker o Helm con el asistente de credenciales del servicio de Harbor administrado (MHS) o los secretos de la CLI.
Para brindar flexibilidad, el dispositivo aislado de Google Distributed Cloud (GDC) proporciona dos métodos para autenticarse con Docker y Helm desde tu instancia del registro de Harbor. El primer método consiste en usar el auxiliar de credenciales de Managed Harbor Service (MHS) y tu identidad de GDC para acceder a la CLI de Docker o Helm. Después de autenticarte con GDC, puedes acceder al cliente de Docker y realizar operaciones de Docker sin tener que crear ni administrar secretos de CLI separados en Harbor.
El segundo método es usar secretos de la CLI. Después de autenticarte con Identity-Aware Proxy (IAP) y acceder a la interfaz de Harbor por primera vez, usa la CLI de Docker o Helm para acceder a Harbor. Las CLIs de Docker y Helm no pueden controlar el redireccionamiento para IAP, por lo que Harbor proporciona un secreto de CLI para usar cuando se accede desde Docker o Helm. Este método solo está disponible cuando Harbor usa la autenticación de IAP.
Antes de comenzar
Para configurar la autenticación de Docker y Helm para las instancias del registro de Harbor, pídele al administrador de IAM de tu organización que te otorgue el rol de visualizador de instancias de Harbor (harbor-instance-viewer).
Accede a Docker o Helm con secretos de la CLI
Para acceder a Docker o Helm con secretos de la CLI, sigue estos pasos:
Accede a Harbor con una cuenta de usuario de IAP.
Haz clic en tu nombre de usuario y selecciona Perfil de usuario.
Para copiar el secreto de la CLI asociado a tu cuenta, haz clic en content_copyCopiar.
Opcional: Para mostrar botones para generar automáticamente o crear manualmente un nuevo secreto de la CLI, haz clic en los puntos suspensivos more_horiz de tu perfil de usuario.
Si generaste un nuevo secreto de la CLI, haz clic en content_copyCopiar para copiarlo.
Ahora puedes usar tu secreto de la CLI como contraseña cuando accedas a Harbor desde la CLI de Docker o Helm:
[[["Fácil de comprender","easyToUnderstand","thumb-up"],["Resolvió mi problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Difícil de entender","hardToUnderstand","thumb-down"],["Información o código de muestra incorrectos","incorrectInformationOrSampleCode","thumb-down"],["Faltan la información o los ejemplos que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-04 (UTC)"],[],[],null,["# Sign in to Docker and Helm\n\nThis page describes how to sign in to Docker or Helm using the Managed Harbor Service (MHS) credential helper or CLI secrets.\n\nTo provide flexibility, Google Distributed Cloud (GDC) air-gapped appliance provides two methods to authenticate with Docker and Helm from your Harbor registry instance. The first method is using the Managed Harbor Service (MHS) credential helper and your GDC identity to sign in to the Docker or Helm CLI. After authenticating with GDC, you can sign in to the Docker client and perform Docker operations, without having to create or manage separate CLI secrets in Harbor.\n\nThe second method is using CLI secrets. After you authenticate using Identity-Aware Proxy (IAP) and sign in to the Harbor interface for the first time, use the Docker or Helm CLI to access Harbor. The Docker and Helm CLIs cannot handle redirection for IAP, so Harbor provides a CLI secret to use when signing in from Docker or Helm. This method is only available when Harbor uses IAP authentication.\n\nBefore you begin\n----------------\n\n- To configure Docker and Helm authentication for Harbor registry instances, ask your Organization IAM Admin to grant you the Harbor Instance Viewer (`harbor-instance-viewer`) role.\n\nSign in to Docker or Helm with CLI secrets\n------------------------------------------\n\nTo sign in to Docker or Helm with CLI secrets, follow these steps:\n\n1. Sign in to Harbor with an IAP user account.\n2. Click your username and select **User Profile**.\n3. To copy the CLI secret associated with your account, click content_copy **Copy**.\n4. Optional: To display buttons for\n automatically generating or manually creating a new CLI secret, click the more_horiz ellipses in your user profile.\n\n | **Note:** A user can only have one CLI secret. When a new secret is generated or created, the old secret becomes invalid.\n5. If you generated a new CLI secret, click content_copy **Copy** to copy it.\n\n6. You can now use your CLI secret as the password when signing in to\n Harbor from the Docker or Helm CLI:\n\n docker login -u \u003cvar translate=\"no\"\u003eUSERNAME\u003c/var\u003e -p \u003cvar translate=\"no\"\u003eCLI_SECRET\u003c/var\u003e \u003cvar translate=\"no\"\u003eHARBOR_INSTANCE_URL\u003c/var\u003e\n\nReplace the following:\n\n- \u003cvar translate=\"no\"\u003eUSERNAME\u003c/var\u003e: the Harbor account username\n- \u003cvar translate=\"no\"\u003eCLI_SECRET\u003c/var\u003e: the generated CLI secret.\n- \u003cvar translate=\"no\"\u003eHARBOR_INSTANCE_URL\u003c/var\u003e: the URL of the Harbor instance.\n\n| **Note:** The CLI secret does not expire, unless you manually rotate it. The CLI secret is not associated with the user identity token. Signing out from Harbor or the GDC console does not revoke the CLI secret."]]