How to change the VMware Harbor registry admin password
search cancel

How to change the VMware Harbor registry admin password

book

Article ID: 398555

calendar_today

Updated On:

Products

VMware Tanzu Kubernetes Grid Integrated Edition

Issue/Introduction

There are two ways to modify the admin password of Harbor registry after the tile is deployed with Opsmanager which are via web interface or API call. 

Environment

VMware Harbor registry

Resolution

1. Via Web UI: On the top right hand side of the web UI click on Admin icon and then "Change Password". 

2. Using the Harbor registry API: 

PUT /users/{user_id}/password 
user_id *
integer($int)(path)
password *
object (body)
Password to be updated, the attribute 'old_password' is optional when the API is called by the system administrator.
{
  "old_password": "string",
  "new_password": "string"
}

Example:
curl -u admin -X 'PUT' \
  'https://yourHarborIP/api/v2.0/users/1/password' \
  -H 'accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "old_password": "OldPassword98",
  "new_password": "NewPassword89"
}'

Additional Information

If you need to retrieve or reset the Harbor admin password see this KB Article.