[users at bb.net] Need help testing BitbucketAuth and "team" privilege scope

Bill Deegan bill at baddogconsulting.com
Thu Jun 29 05:03:57 UTC 2017


Craig,

It's curious that it needs that.

>From the docs:

team

Grants the ability to get a list of teams of which the current user is a
member. This is covered by the teams endpoint.

   - information about all the groups and teams I am a member or admin of

(
https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html
)

Looks like this line is trying to query for what teams the user is a member
of...

orgs = self.get(c, '/teams?role=member')

https://github.com/buildbot/buildbot/blob/master/master/buildbot/www/oauth2.py#L377

If there's a way to wrap that to handle the error you're seeing and continue?

Is your user a member of a team on bitbucket?

-Bill


On Wed, Jun 28, 2017 at 8:33 PM, Craig Rodrigues <rodrigc at crodrigues.org>
wrote:

> I am using bitbucket.org
>
> --
> Craig
>
> On Wed, Jun 28, 2017 at 8:30 PM, Bill Deegan <bill at baddogconsulting.com>
> wrote:
>
>> Is this for bitbucket.org, or the bitbucket server?
>>
>> -Bill
>>
>> On Wed, Jun 28, 2017 at 3:38 PM, Craig Rodrigues <rodrigc at crodrigues.org>
>> wrote:
>>
>>> Hi,
>>>
>>> I am trying to test BitbucketAuth, and am running into some problems.
>>>
>>> I followed the instructions at:
>>>
>>> http://docs.buildbot.net/latest/manual/cfg-www.html#authenti
>>> cation-plugins
>>>
>>> and set up my Bitbucket account to authorize my Bitbucket instance.
>>> I took my client id and client secret and put it in my master.cfg:
>>>
>>> c['www'] = dict(port=8010,
>>>     auth=util.BitbucketAuth("myclientid", "myclientsecret"),
>>>     plugins=dict(waterfall_view={}, console_view={}))
>>>
>>> From buildbot, I was able to Log into Bitbucket,
>>> but then it doesn't work.  After some debugging, I
>>> found this message is coming back from Bitbucket:
>>>
>>> {'type': 'error', 'error': {'message': 'Your credentials lack one or
>>> more required privilege scopes.', 'detail': {'granted': ['pullrequest',
>>> 'account'], 'required': ['team']}}}
>>>
>>> Does anyone know how to set the "team" privilege scope?
>>>
>>> I'm not familiar with the Bitbucket UI so don't know where to set it
>>> --
>>> Craig
>>>
>>> _______________________________________________
>>> users mailing list
>>> users at buildbot.net
>>> https://lists.buildbot.net/mailman/listinfo/users
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.buildbot.net/pipermail/users/attachments/20170628/ea101d12/attachment.html>


More information about the users mailing list