There are two parts to configuring MDOQ to talk to Bitbucket.
- Setup via OAuth app to allow MDOQ to create branches/pull requests and merges.
- Add an SSH key to allow MDOQ to pull and push commits to Bitbucket
Bitbucket OAtuh App Setup
Visit https://bitbucket.org/ and click you user icon bottom left > Bitbucket settings > Access Management > Oauth
Click 'Add consumer' and fill out the details accordingly
Field | Value |
---|---|
name | name: MDOQ |
description | MDOQ Connector |
callback url | https://mdoq.io/bitbucket/register/LIVE_INSTANCE_ID/ |
permissions | repositories:read, |
write pullrequests:read,write |
Then hit Save
Copy Key and Secret into fields in source control config in MDOQ and hit save
Key is Api Username
Secret is Api Password.
Once you have hit save you should be able to follow the link under the source control type, to register MDOQ with Bit Bucket.
Bitbucket SSH Key Setup
Because Bitbucket doesn't allow you to create deploy keys that can write (they are read only). You need to add an SSH key to your account, or a machine user account that has write permissions to your repository.
- Generate an SSH key. (the keys must not have a passphrase)
- Visit https://bitbucket.org/ and click you user icon bottom left > Bitbucket settings > SSH Keys
- Click "Add key" and paste in the public part of your key. Git it the label "MDOQ"
- In MDOQ go to the git settings and add the private part of the key to "Private Key" and click save.