Hi guys,
We have been using (Linux) CURL command to download ZIP file from bitbucket "downloads" section and its working completely fine. But its not working now. We haven't changed anything except account password.
we are using URL structure as below:
sudo curl -O -L https://bitbucket.org/<ORGANISATION>/<REPO>/downloads/Artifacts.zip -u 'username:AppPassword'
But we are getting this issue: (Actually when we hit above command this file gets downloaded)
By using -v parameter in above command, we are getting details as below:
Also, we have tried creating new app password and added that in above command in user authentication. but its not working.
NOTE: we are aware about new authentication changes made by Atlassian, that we must use app password for authentication and we are using app password for it (not account password) but somehow those changes are not working for us.
Can anyone please tell us what we are doing wrong? because it was working before
G'day Vivek!
With the change from basic GIT username/password over to AppPassword, you will now need to make use of our /2.0/repositories API endpoint with your AppPassword.
Performing API commands on direct links to files within a repository will cause an authentication issue as the deprecated authentication method is used by default.
For example, the below command will work for your purposes:
curl -X GET -O -L \
--url https://api.bitbucket.org/2.0/repositories/<ORGANISATION>/<REPO>/downloads/Artifacts.zip \
--header 'Authorization: Basic AppPasswordHere'
Hope this helps.
Cheers!
- Ben (Bitbucket Cloud Support)
Thank you so much....It Worked!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Vivek,
Not a problem, I'm glad to know that has helped you out!
Cheers
- Ben (Bitbucket Cloud Support)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The command has worked for me as well ... but the Artifacts.zip file is empty.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.