Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Artifactory: upload with api key (not password)

Tags:

artifactory

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.

like image 349
spuder Avatar asked Oct 12 '16 22:10

spuder


2 Answers

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

like image 142
spuder Avatar answered Sep 23 '22 02:09

spuder


See the various authentication options, including authentication using API key, in the JFrog CLI for Artifactory documentation page: https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory

like image 28
Eyal Ben Moshe Avatar answered Sep 23 '22 02:09

Eyal Ben Moshe