I’ve setup drone 0.7 (also 0.8 with the same result) on AWS ECS using bitbucket cloud as source control provider. I’m able to login with my user but I can’t activate any repo because it gives me 500. I have tested this with both versions and have the same result.
Bitbucket it’s an organization repo and I’m an user with admin permisions on that org. I have successfully setup the OAuth consumer as I’m able to login to drone using my bitbucket user.
Unfortunately Bitbucket error messages are a bit lacking, but below are some common reasons that activating a Bitbucket repository will fail. Note that you can also check your drone server logs, which may provide some more details.
1. Not enabling all of the following Bitbucket scopes when you registry the application:
Webhooks:Read and Write
2. Not having admin access to the repository in Bitbucket. This is required in order to create the webhooks
3. Using Drone with a private URL or address. Bitbucket will error if you try to create a webhook at a URL that it cannot reach. This includes localhost.
You mentioned that you get a 500 … can you check the HTTP message response? The error message should be included in the response body. If it does not surface the message in the UI you can check the chrome developer console / network monitor.
It looks like Bitbucket is rejecting the request. The only time I’ve seen this happen is why your server address is localhost / not publicly accessible by Bitbucket.
Note that when running Drone behind a load balancer or reverse proxy it will mask the real server address. When this happens drone will think that its address is localhost, and will therefore use localhost to construct the webhook URL. This can be solved by configuring your reverse proxy to set the appropriate X-Forwarded-For and X-Forwarded-Proto headers.
that’s not what this setting stand for: DRONE_HOST?
Bradry thanks for your help! yeah…what you found was that I was exposing the app through an internal Load balancer, and since I was testing inside my VPN didn’t realize that wasn’t public, I have changed that and I’m allowed to use it now. Another pair of eyes was really good!