如何在存储区域上存储库?

时间:2015-03-24 12:50:19

标签: rest python-requests bitbucket-server git-fork

我们可以使用此

来存储库
 /rest/api/1.0/projects/{projectKey}/repos/{repositorySlug}

但是我无法理解如何在python请求API中使用它? 它会抛出500状态代码。

我用过这个:

requests.post("https://PROJECTURL/rest/api/1.0/projects/PRJ_KEY/repos/REPO_NAME",
  auth=("usename", "password"), verify=False)

任何想法我应该如何定义它?

1 个答案:

答案 0 :(得分:0)

我相信你需要提供POST有效载荷,即使它是空的JSON - 例如:{}