How to download a repository using Archive for Stash plugin API using command line
Step-by-step guide
- Download the Archive Plugin from Marketplace
- You can use
curl
to download the file:
curl -v -J -O -u admin:admin "http://localhost:7990/plugins/servlet/archive/projects/TES/repos/repotest3?at=production&format=tar.gz&filename=mytest.tar.gz"
- Where
http://localhost:7990
is your instance's Base URL
According to Curl changelog this functionality was added in the "7.20.0 - February 9 2010" release.
added -J/--remote-header-name for using server-provided filename with -O
Hence, if you want to use that option please update the curl version for your OS.
Or use the alternative below if you are unable to upgrade your curl
:
curl -v -u admin:admin "http://localhost:7990/plugins/servlet/archive/projects/TES/repos/repotest3?at=production&format=tar.gz" -o mytest.tar.gz
- Specifying the parameter
filename=mytest.tar.gz
is useless as the header Content-Disposition: attachment; filename="mytest.tar.gz" will be ignored bycurl
Related articles
Content by label
There is no content with the specified labels
Last modified on Mar 7, 2014
Powered by Confluence and Scroll Viewport.