artifactory

Artifactory: upload with api key (not password)


How would you upload an artifact to artifactory without using a password?

If I create a new user specific for uploads, that user by default doesn't git the 'upload' permission unless they are an administrator.


Solution

  • To upload with credentials

    curl -u admin:'correct-horse-battery-staple' -T foo.zip
    

    To upload with an api key

    curl --header 'X-JFrog-Art-Api: 1234567890' -T foo.zip
    

    Alternativly you can use the syntax <username:apikey>

    curl -u admin:1234567890 -T foo.zip
    

    https://www.jfrog.com/confluence/display/RTF/Artifactory+REST+API

    You can create the api key on the user profile page.

    enter image description here