【问题标题】:Downloading from bitbucket using REST Api Bitbucket使用 REST Api Bitbucket 从 bitbucket 下载
【发布时间】:2018-12-21 15:34:40
【问题描述】:

最近我发现我可以使用 Rest Api Bitbucket 来下载存储库。 我阅读了文档,但到目前为止我没有设法下载任何文件,而是使用curl 下载了一些 HTTP 标头。

谁能给我一个关于如何使用 API 的具体例子?

我知道命令是curl https://api.bitbucket.org/2.0/repositories/,但我的bitbucket链接是这样的

http://company repository site/projects/project/repos/repo/

更新 1

**

我设法使用 curl 使用语法下载了一个文件:curl -u user:pass http://company_repository_site/projects/my_project/repos/my_repo/my_file.ext?raw,但我仍然想知道如何使用 REST Api 完成此操作

**

谢谢,丹尼尔。

【问题讨论】:

    标签: curl bitbucket bitbucket-api


    【解决方案1】:

    最后我用了

    curl -u user:pass `bitbucketCompanyServer`/rest/api/1.0/projects/`project`/repos/`repository`/browse/`fullPathToFileOnBitbucket`?at=`commit` > output
    

    希望对你有帮助

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-07-22
      • 1970-01-01
      • 1970-01-01
      • 2023-01-27
      • 1970-01-01
      • 2012-06-10
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多