CLI
If using the CLI, an API key is minted automatically when you successfully runharbor auth login.
The key is stored in ~/.harbor/credentials.json and revoked upon harbor auth logout.
You can also authenticate the CLI via the HARBOR_API_KEY environment variable. The next
section demonstrates creating an API key via the web UI.
Web UI
To mint an API key on the web UI, first go to the Hub. Click on your profile in the top-right corner:






