Docker Login to DIV Harbor
In this guide, we will look at how to "docker" login to the DIV Harbor Repository
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.
- Log in to Harbor with an DIV-ID user account.
- Click your username at the top of the screen and select User Profile.
- Click the clipboard icon to copy the CLI secret associated with your account.
- Optionally click the … icon in your user profile to display buttons for automatically generating or manually creating a new CLI secret.
A user can only have one CLI secret, so when a new secret is generated or create, the old one becomes invalid.
- 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.