Is there a command to use in bash script to download a particular file from branch under a Stash Repo

Teja Jonnalagadda
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 22, 2015

I have used the following curl command to get the file from particular branch unde the repo ,But I always get an empty file.Following  is the command

curl  -G http://stash.xxx.com:80808/projects/test.properties -d at=refs/branch/master -d raw >test.properties

Is there any issue with the command?

2 answers

0 votes
theja krishna
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 23, 2015

Hi Mike,

Thanks for the response.I do able to get the file now.But it contains the HTML Tags eventhough i use '-d raw' parameter.

0 votes
Mibex_Software
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.
June 22, 2015

Hi,

Your cURL command is OK, but you need to substitute "branch" with "heads" in "refs/branch/master".

Hope this helps.

Cheers,

Michael

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events