That is exactly the documentation that is incorrect. More specifically, under the Registration section:
You must register your application with Bitbucket Server in order to generate a consumer key. Navigate to your account settings and choose Applications from the menu, and click Register new application. Now copy & paste the text value from /etc/bitbucket/key.pub into the Public Key in the incoming link part of the application registration.
Please use http://drone.mycompany.com/authorize as the Authorization callback URL.
There is no option to ‘register new application’ in my account settings in Bitbucket Server
The links in my post reference the Atlassian docs on how to register an application to use OAuth. I tried using those combined with the info from http://readme.drone.io/admin/setup-bitbuket-server/ but still can’t make it work.
oauth_callback="oob" in your error message is interesting. This would tell me that Bitbucket was not configured with a callback URL and is using oob as the redirect. The oob callback is used for non-web applications that don’t have an address:
Non-web applications may wish to use custom URL schemes, or out-of-band handling. Out-of-band handling is triggered by setting the callback URL to the string
I obviously can’t speak to the Bitbucket Server implementation (have never used it) but I do have some experience with oauth1 and this stands out to me as a possible root cause.
I have never heard of the shared secret, so unfortunately I cannot comment there. Perhaps the “Link Applications” screen is not the correct screen to setup the integration?
In this case I highly recommend everyone having issues with Bitbucket Server contact the guy that implemented this integration. He should be considered the maintainer and is best qualified to support it. His GitHub handle is josmo. He can be contacted in this thread https://github.com/drone/drone/pull/1581
Another option would be to ask Bitbucket support, assuming you pay for enterprise support.
I installed it yesterday and have the newest docker image with 0.5 tag.
[email protected]:~# docker pull drone/drone:0.5
0.5: Pulling from drone/drone
Status: Image is up to date for drone/drone:0.5
I got the information that i have to put the “DRONE_SECRET” into “Shared secret”, but still don’t know what needs to go in “Request Token URL” and “Access token URL”. I leaved it empty this time. I got an error that this fields are needed but the link was still created. And again i get a redirect loop when trying to login.
@davidak per the link @josmo posted, it indicates that error is common when a reverse proxy is not configured with the HOST. This is also a common issue with Drone when a reverse proxy is not configured with X-Forwarded-For and X-Forwarded-Proto headers. Are you using a reverse proxy, and have you configured these headers to get passed to Drone?
@davidak can you add a screenshot of the incoming link with the values blured out and what you have for the container start. Also, if you’re up for it I’m down to screen hero for 15-30 minute to help you out.