How to download a repository using Archive for Bitbucket Server plugin API using command line
- Download the Archive Plugin from Marketplace
- You can use
curlto 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"
http://localhost:7990is 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 -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.gzis useless as the header Content-Disposition: attachment; filename="mytest.tar.gz" will be ignored by