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

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

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

手順

  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

 

指定したラベルを持つコンテンツはありません。

Last modified on Mar 7, 2014

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.