The Atlassian Community can help you and your team get more value out of Atlassian products and practices.
I'm trying to download an artifact I have uploaded to Bitbucket Downloads through cURL or wget. The issue seems to be that the cURL and wget don't receive an answer from the Bitbucket API.
How to reproduce:
- Have a file stored in https://bitbucket.org/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}
/downloads/
- Have an App password
- Use cURL/wget and the API to download the file.
- No output returns.
I have tried different variations, for example with a different Agent-Header:
curl -A "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0" -u ${USER}
https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}
/downloads/${file}
But does not work.
I also have tried to follow the Step3b from the Deploy build artifacts to Bitbucket Downloads
but instead of POST trying with GET but the output is:
curl: (26) Failed to open/read local data from file/application
I'm not sure if the issue is from my side or any kind of bug or problem with the Bitbucket Cloud API.
Fixed this.
The problem is related to the redirects. cURL was not following the redirects.
The -L flag makes cURL follow to the last redirect and downloads the file.
Example:
curl -L --compressed -X GET -u ${USER}
https://api.bitbucket.org/2.0/repositories/${BITBUCKET_REPO_OWNER}/${BITBUCKET_REPO_SLUG}
/downloads/${file}
> ${file}
.tgz
Beginning on April 4th, we will be implementing push limits. This means that your push cannot be completed if it is over 3.5 GB. If you do attempt to complete a push that is over 3.5 GB, it will fail...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.