How to download a repository using Archive for Stash plugin API using command line

'How Do I...' and 'How to...' Guide to Stash

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Step-by-step guide

  1. Download the Archive Plugin from Marketplace
  2. 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 by curl


There is no content with the specified labels

Last modified on Mar 7, 2014

Was this helpful?

Provide feedback about this article
Powered by Confluence and Scroll Viewport.