无法通过 API 安装插件
Cannot install plugins via API
我正在尝试通过 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",
“作者”:“塞巴斯蒂安·斯多拉”,
“类别”:空,
“健康)状况”: {
“拱门”:空,
“最小版本”:“1.32”
},
"description": "显示您存储库中的最新 activity。",
"groupId": "sonia.scm.plugins",
"name": "scm-activity-plugin",
“截图”:[
“http://download.scm-manager.org/images/scm-activity-plugin/screenshot-1.png”
],
“状态”:“已安装”,
"url": "https://bitbucket.org/sdorra/scm-activity-plugin",
“版本”:“1.12”,
“维基”:空
},
有人可以帮助我吗?我使用的是 1.6
版本
您还必须在 URL 中指定组 ID 和版本。像这样的东西应该适用于 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
我正在尝试通过 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", “作者”:“塞巴斯蒂安·斯多拉”, “类别”:空, “健康)状况”: { “拱门”:空, “最小版本”:“1.32” }, "description": "显示您存储库中的最新 activity。", "groupId": "sonia.scm.plugins", "name": "scm-activity-plugin", “截图”:[ “http://download.scm-manager.org/images/scm-activity-plugin/screenshot-1.png” ], “状态”:“已安装”, "url": "https://bitbucket.org/sdorra/scm-activity-plugin", “版本”:“1.12”, “维基”:空 },
有人可以帮助我吗?我使用的是 1.6
版本您还必须在 URL 中指定组 ID 和版本。像这样的东西应该适用于 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