Amplify-console: Unable to connect application to Bitbucket repo

Created on 24 Sep 2019  路  5Comments  路  Source: aws-amplify/amplify-console

Describe the bug
Unable to connect application to Bitbucket repo through AWS Amplify Console

To Reproduce

  1. Connect new application through AWS Amplify Console
  2. Select Bitbucket as source provider
  3. Connect to Bitbuket
    ...
  4. On Save and deploy
Houston, there's a problem
There was an issue setting up your repository. Please try again later.({"type": "error", "error": {"message": "Your credentials lack one or more required privilege scopes.", "detail": {"granted": ["webhook", "repository:admin", "repository:write", "team", "account"], "required": ["pullrequest"]}}})

Expected behavior
Sufficient permission should be requested

For community
For avoiding the problem I proceed following steps

  1. On Bitbucket go to Settings -> OAuth -> OAuth consumer -> Add consumer
  2. Grant needful permissions and set callback URL as http://localhost:3000
    bitbucket
  3. Get Key of the consumer
  4. Request url in browser as
    https://bitbucket.org/site/oauth2/authorize?client_id={client_id}&response_type=code
    where client_id is Key from previous step, More info
  5. Grant access, you will be redirected to callback url with with code
  6. Curl the request
    curl -X POST -u "client_id:secret" \ https://bitbucket.org/site/oauth2/access_token \ -d grant_type=authorization_code -d code={code}
    with needful data and get access_token from the response
  7. Create app with aws-cli
    $ aws amplify create-app --name ${name} --repository [email protected]/${repo} --platform WEB --oauth-token ${oauth_token}
    Important
    Repo should be pointed exactly as [email protected]/path or it will lead to unexpected behavior on console aws-amplify/amplify-console#154
bug

All 5 comments

@JIoJIaJIu Thanks for reporting bug. We are working on it now.

@JIoJIaJIu Thanks for reporting. We just add the extra permission to our Oauth app. Can you try again?

Hello @garyleefight, I confirm that now creating apps works! Thank you for such fast fix

Offtopic
Could you please take a look at the case - https://stackoverflow.com/questions/58078457/update-repo-accesskey-for-existed-application-in-aws-amplify
Should I raise an issue / feature request?

@JIoJIaJIu Yes. You can raise a feature request. Thanks for the feedback

@JIoJIaJIu that is now supported in Amplify Console. Go to App settings > Re-authenticate app

Was this page helpful?
0 / 5 - 0 ratings