0

我正在尝试通过 API 安装 scm-activity-plugin 和 scm-webhook-plugin 并且无法正常工作。我尝试了所有可能的选择但没有成功:

curl -k -s -u "user:pass" -X POST "https://my_custom_address/scm/api/rest/plugins/install/scm-activity-plugin/" -H "Content-Type: application/json"

curl -k -s -u "user:pass" -X POST "https://my_custom_address/scm/api/rest/plugins/install/scm-activity-plugin/" -H "接受:application/json"

curl -k -s -u "user:pass" -X POST "https://my_custom_address/scm/api/rest/plugins/install/scm-activity-plugin"

GET 工作正常:{ "artifactId": "scm-activity-plugin", "author": "Sebastian Sdorra", "category": null, "condition": { "arch": null, "min-version" : "1.32" }, "description": "显示存储库中的最新活动。", "groupId": "sonia.scm.plugins", "name": "scm-activity-plugin", "screenshots": [ “http://download.scm-manager.org/images/scm-activity-plugin/screenshot-1.png”],“状态”:“已安装”,“url”:“https://bitbucket.org/ sdorra/scm-activity-plugin", "version": "1.12", "wiki": null },

有人可以帮助我吗?我使用的是 1.6 版

4

1 回答 1

0

您还必须在 URL 中指定 groupid 和版本。像这样的东西应该适用于 1.60 版:

curl -u "user:pass" \
    http://localhost:8080/scm/api/rest/plugins/install/sonia.scm.plugins:scm-activity-plugin:1.12 \
    -H "Accept: application/json" \
    -X POST
于 2020-08-24T12:55:43.363 回答