Download private BitBucket repository zip file usi

2020-01-30 03:57发布

I'm writing a script to easily deploy an application. The code for the application is stored in a private BitBucket repository.

I'd like to be able to download a zip file of the commit. I've tried authenticating with the following code:

https://user:pass@bitbucket.org/user/repo/get/commit.zip

However, instead of accomplishing the task it redirects to the login page on BitBucket.

7条回答
狗以群分
2楼-- · 2020-01-30 04:19

Does the tool you're using support basic authentication credentials in the URL? Curl request with digest auth in PHP for download Bitbucket private repository strongly implies that:

curl --user user:pass https://bitbucket.org/user/repo/get/commit.zip >commit.zip

works.

查看更多
登录 后发表回答