Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Download a single file from remote repo using stash

SUMEET GARG April 30, 2013

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.

Thanks

Sumeet

3 answers

1 accepted

1 vote
Answer accepted
Mirko Skramusky
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 1, 2013

Hi Sumeet,

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

https://stash.domain.de/projects/PROJECT/REPO/PATH/TO/FILE/FILENAME.EXT?raw

You can access files using standard https authentication.

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

Hope this helps.

0 votes
SUMEET GARG May 8, 2013

The answer is here as informed by Mirko.

0 votes
SUMEET GARG May 7, 2013

Hi,

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

Thanks

pgmvva June 3, 2020

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.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events