Docker Login to DIV Harbor

Requirements:

  • Accounted created at DIV Harbor
  • Harbor CLI Secret
  • Docker

Loging in to DIV Habor

After you have authenticated via Auth0 and logged into the DIV Harbor for the first time, you can use the Docker or Helm CLI to access DIV Harbor Repo.

The Docker and Helm CLIs cannot handle redirection for DIV-ID, so DIV Harbor provides a CLI secret for use when logging in from Docker or Helm. This is only available when Harbor uses DIV-ID authentication.

  1. Log in to Harbor with an DIV-ID user account.
  2. Click your username at the top of the screen and select User Profile.
Harbor User
  1. Click the clipboard icon to copy the CLI secret associated with your account.
Harbor User
  1. Optionally click the … icon in your user profile to display buttons for automatically generating or manually creating a new CLI secret.
Harbor User

A user can only have one CLI secret, so when a new secret is generated or create, the old one becomes invalid.

  1. If you generated a new CLI secret, click the clipboard icon to copy it.

To login to DIV Harbor, you’ll need to run the following command:

Docker Login Command

docker login -u <username> -p <CLI Secret> harbor.divsphere.net

-u: specifies the username you specified at DIV Harbor

-p: specifies the password for DIV Harbor, in this case the CLI Secret

You are now logged in to DIV Harbor and are ready to push towards the registry.