我正在尝试通过rest api(1.0版)将用户添加到Bitbucket组,我的电话是:
curl -k -u user:pass-X PUT -H "Content-Type: application/json" "https://server/bitbucket/rest/api/1.0/groups/$USER/$g/members/$USER/" --data '{}'
我在这里找到的指南:https://confluence.atlassian.com/bitbucket/groups-endpoint-296093143.html
但仍然出现错误:
11:34:16 % Total % Received % Xferd Average Speed Time Time Time Current
11:34:16 Dload Upload Total Spent Left Speed
11:34:16
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 216 0 214 100 2 1018 9 --:--:-- --:--:-- --:--:-- 1023
11:34:16 404null for uri: https://server/bitbucket/rest/api/1.0/groups/testUser/test/members/testUser/ % Total % Received % Xferd Average Speed Time Time Time Current
有人可以吗?帮帮我吗?
答案 0 :(得分:0)
解决了。 curl -v -k -u user:passs-X POST -H "Content-Type: application/json" "server/bitbucket/rest/api/1.0/admin/groups/add-user" --data '{"context": "$g","itemName": "$USER"}'