Reputation: 33
Referring the guide below, I'm trying to upload library files to a maven repository on Artifactory; however, I'm having an error.
We've installed Artifactory on premise Linux server, and created a maven repository to store libraries for Java app build. It's prepared because our environment does not allow access to public internet and jcenter. We're planning to configure build job with maven on Jenkins which takes all the necessary libraries from the Artifactory repository.
The library files are given by development team. It follows maven structure because it's exported from Maven on local development PC.
I zipped the files, placed on the server and hit the below code.
curl -u user:password -X PUT http://[artifactory URL]/../[repository name] /tmp/src/archive.zip
Expected successful files upload to the repository. However, I've got the below error.
{"errors" : [ {
"status" : 403,
"message" : ""
}]
}curl: (3) <url> malformed
Upvotes: 1
Views: 4673
Reputation: 33
I figured out the cause. The reason was because our version is not Artifactory Pro.
I was told it's pro but confirmed the actually installed SW is OSS version.
Upvotes: 2
Reputation: 2768
I zipped the files, placed on the server and hit the below code.
curl -u user:password -X PUT http://[artifactory URL]/../[repository name] /tmp/src/archive.zip
A few issues here:
/../
. Just http://[artifactory URL]/[repository name]
should be fine.PUT
to. It's clear that this isn't your intent; the second path is the file you want to upload. You need to specify that by preceding it with, say, a -T
.X-Explode-Archive: true
or X-Explode-Archive-Atomic: true
.So your call should be something like:
curl -u user:password -X PUT http://[artifactory URL]/[repository name] -T /tmp/src/archive.zip -H 'X-Explode-Archive: true'
Upvotes: 0