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

お困りですか?

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

コミュニティに質問

手順

  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

 

最終更新日 2015 年 9 月 16 日

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

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