ARTIFACTORY: How can we reset user/password for remote repositories all at once in Artifactory Edge?

AuthorFullName__c
David Shin
articleNumber
000005529
FirstPublishedDate
2022-12-28T08:20:43Z
lastModifiedDate
2025-05-15

ARTIFACTORY: How can we reset user/password for remote repositories all at once in Artifactory Edge?

In some cases a password can be rotated/changed in your Artifactory instance suddenly.
This article will describe how to reset the username/password for remote repositories all at once in Artifactory Edge instance. 
 

Solution 1

When Artifactory Edge is up and running, to update the username and password for all remote repos, we  can use the api/system/configuration REST API

1. To get a current config, we can run 

 curl -u admin localhost:8082/artifactory/api/system/configuration > config.xml


2. Replace the old username/password with the new username/password using your favorite Editing tool

   vi config.xml
    :%s/old_password/new_password/g


3. To update new config with new user/password, we can run 

    curl -u admin  localhost:8082/artifactory/api/system/configuration -XPOST -T config.xml
Solution 2

When Artifactory Edge is not running, we can copy the artifactory.config.latest.xml to artifactory.config.import.xml 
and replace old user/password with new user/password in artifactory.config.import.xml
and restart the Artifactory Edge.