JFrog artifactory downloads file with 0 bytes

Viewed 579

I'm writing a CI/CD pipeline in GitLab for an android application. I use JFrog's Artifactory to push my '.apk' files as intermediary storage. From there I'm distributing to the Firebase distribution server.

In the above mentioned workflow, I can upload the file (apk) to the artifactory without any issues. I use this command to do that:

curl -uusername:token -T file.apk "https://domain-name.jfrog.io/artifactory/folder/file.apk

The upload works fine. I can manually download the file from JFrog console, if required. But when I try to download the file, the file gets downloaded but shows only 0B in size. I'm using this command to download the file:

curl -sSf -uusername:token -O '"https://domain-name.jfrog.io/artifactory/folder/file.apk'

Am I missing something or did I do something wrong. Any help is appreciated.

1 Answers

The comment from @Eldad Assis answers my question. It seems the -L option with curl command works. At final, this is the command that I used to download the artifact from JFrog artifactory:

curl -L -u${JFROG_USERNAME}:${JFROG_TOKEN} \
      -X GET "https://domain-name.jfrog.io/artifactory/folder/file.apk" \
      --output file.apk
Related