저는 Bitbucket 계정이 myaccount
입니다. 나는 ateam
이라는 팀의 개발자로서 나에게 속하지 않는다. 나는이 팀의 관리자가 아니다. 개발자는 ateam
에 리포지토리를 만들도록 권한을 설정합니다. ateam
~ bitbucket
웹 사이트의 UI에 수동으로 리포지토리를 만들 수 있습니다. 그러나 bitbucket의 API를 사용하여 수행 할 수 없습니다.API를 사용하여 개발자로 팀에서 Bitbucket 리포지토리를 만들 수 없습니다.
$ curl -X POST -v -u myaccount:mypasswd https://api.bitbucket.org/2.0/repositories/ateam/rep1 -H "Content-Type: application/json" -d '{"is_private": true}'
Enter host password for user 'myaccount':
* Trying 104.192.143.5...
* Connected to api.bitbucket.org (104.192.143.5) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: *.bitbucket.org
* Server certificate: DigiCert SHA2 High Assurance Server CA
* Server certificate: DigiCert High Assurance EV Root CA
* Server auth using Basic with user 'myaccount'
> POST /2.0/repositories/histeam/rep2 HTTP/1.1
> Host: api.bitbucket.org
> Authorization: Basic YWxleGFuZHJlLW5hZGluOmJpdGJ1Y2tldDEy
> User-Agent: curl/7.43.0
> Accept: */*
> Content-Type: application/json
> Content-Length: 20
>
* upload completely sent off: 20 out of 20 bytes
< HTTP/1.1 403 FORBIDDEN
< Server: nginx/1.6.2
< Vary: Authorization, Cookie
< Content-Type: application/json; charset=utf-8
< Strict-Transport-Security: max-age=31536000
< Date: Thu, 14 Jul 2016 09:59:27 GMT
< X-Served-By: app-111
< X-Static-Version: 53f44cd8792e
< ETag: "2517d8a35dee8cb8cd9e5f0c889915ba"
< X-Render-Time: 0.0265378952026
< X-Accepted-OAuth-Scopes: repository:admin
< Connection: keep-alive
< X-Version: 53f44cd8792e
< X-Request-Count: 317
< X-Frame-Options: SAMEORIGIN
< Content-Length: 35
<
* Connection #0 to host api.bitbucket.org left intact
{"error": {"message": "Forbidden"}}
나는 액세스를 금지했습니다.
이제 ateam
의 소유자가 팀의 관리자가되었습니다. 그 이후로 나는 위와 똑같은 명령을 ateam
에 저장소를 만들 수 있어요 :
$ curl -X POST -v -u myaccount:mypasswd https://api.bitbucket.org/2.0/repositories/ateam/rep1 -H "Content-Type: application/json" -d '{"is_private": true}'
요점은 내가 아닌 관리자로, 개발자로서 API를 사용하여 저장소를 만들 필요가있다. 웹 사이트의 GUI를 사용하지만 API를 통하지 않고 작동합니다. 저장소를 만들 수있는 권한이 있음에도 불구하고 개발자는 API를 사용하여이를 금지합니다. 여기에 버그가 있습니까? 그렇지 않다면 나는 무엇인가 놓치고 있습니까?
편집 여기에 1
팀에 개발자의 권한의 스크린 샷이다. 보시다시피, 그들은 저장소를 생성 할 수 있어야합니다. 여기
필자는 관리자 만이 리포지토리를 만들 수 있다는 것을 알고 있습니다. – AMAN77
그건 사실이 아닙니다. 팀에 대한 devs 권한을 보여주기 위해 이미지를 첨부했습니다. 모든 개발자는 웹 인터페이스를 사용하여 팀에서 리포지토리를 만들 수 있습니다. 그래서 어떤 이유로 금지되어있는 API와 함께. – kaligne