How to use wget to pull a file from BitBucket?

In case a specific file needs to be downloaded wget works pretty well - https://bitbucket.org/#####/<repository>/raw/<tag>/<path to file>. But if I need to download all files present under a branch - I am using following command line -

wget -N --reject "index.html*" -e robots=off --user='#####' --password='#####' -l1 -r -np https://bitbucket.org/#####/bulkimagerenderer-service/raw/0.6/bulkimagerenderer-service-restapi/deploy/

Nothing gets downloaded. It works well with SVN. What command line updates we need to make for BitBucket?

OR Git clone is the only option for such a scenario?

2 answers

1 vote
b1naryb0y I'm New Here Feb 14, 2018

Hey Kirtesh,

I found this answer in another forum. You need to add files to the Downloads section in each repo, and then you're able to get a download link for those files for the below code.

 

curl --user username -L -O  https://bitbucket.org/account/repo/downloads/myfile.tar.gz

I think what you're after is covered by git archive.

 

 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

23,058 views 26 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you