deploying Zip files to Artifactory

Viewed 38

I have a requirement to deploy zip files to artifactory, I tried few options like httpclient,okHTTP and Rest assured but once the file is deployed the file is getting corrupted saying : error no zipinput stream found . The fact is other files are getting deployed without any issue.

I also want to add that deploying zip files through postman is working like a charm.

1 Answers

The easiest way to upload files to JFrog Artifactory is using the JFrog CLI:

Install the JFrog CLI using one of your favorite methods and upload with one simple command:

# Install JFrog CLI in your PATH
curl -fL https://install-cli.jfrog.io | sh

# Upload a file:
jf rt u path/to/file.zip target-repo/path/in/repo/ --flat --url https://acme.jfrog.io --access-token <access-token>

# Upload a directory:
jf rt u path/to/directory/ target-repo/path/in/repo/ --flat --url https://acme.jfrog.io --access-token <access-token>

# Upload all zip files in a directory:
jf rt u "path/to/directory/*.zip" target-repo/path/in/repo/ --flat --url https://acme.jfrog.io --access-token <access-token>

Read more about the upload command in the documentation: https://www.jfrog.com/confluence/display/CLI/CLI+for+JFrog+Artifactory#CLIforJFrogArtifactory-UploadingFiles

Related