It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Download a single file from remote repo using stash

I want to download a single file from a remote repo. We access stash using https. Please suggest possible commands for this.

I tried "git archive" but it does not seem to be working with stash using https protocol.



3 answers

1 accepted

1 vote
Answer accepted

Hi Sumeet,

I don't know you specific use case, but stash also provides "raw links" to any file, e.g.

You can access files using standard https authentication.

A discussion about git archive and stash you can find here.

Hope this helps.


If I download using the above method, I get a file with html tags. I want a clean file as it is.


This should work:

wget --auth-no-challenge --http-user=USER --http-password=PASSWORD http://bitbucket/path_to_raw_file


--auth-no-challenge send Basic HTTP authentication information

--http-user=USER set http user to USER.

--http-password=PASS set http password to PASS.

The answer is here as informed by Mirko.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Bitbucket

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

1,107 views 0 5
Read article

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you