From ec04ea76aa484079f342d9075f4847dbc01acdab Mon Sep 17 00:00:00 2001 From: Garrett Boatman Date: Sun, 21 Jun 2020 00:56:56 -0700 Subject: [PATCH] =?UTF-8?q?docs:=20Update=20Docs:=20Backends=20=E2=80=9Cbi?= =?UTF-8?q?tbucket-backend=E2=80=9D=20(#3910)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- website/content/docs/bitbucket-backend.md | 31 +++++++++++------------ 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/website/content/docs/bitbucket-backend.md b/website/content/docs/bitbucket-backend.md index 9772cf38..fd59fdb6 100644 --- a/website/content/docs/bitbucket-backend.md +++ b/website/content/docs/bitbucket-backend.md @@ -1,9 +1,8 @@ --- title: Bitbucket -weight: 20 group: backends +weight: 20 --- - For repositories stored on Bitbucket, the `bitbucket` backend allows CMS users to log in directly with their Bitbucket account. Note that all users must have write access to your content repository for this to work. To enable it: @@ -11,26 +10,26 @@ To enable it: 1. Follow the authentication provider setup steps in the [Netlify docs](https://www.netlify.com/docs/authentication-providers/#using-an-authentication-provider). 2. Add the following lines to your Netlify CMS `config.yml` file: - ```yaml - backend: - name: bitbucket - repo: owner-name/repo-name # Path to your Bitbucket repository - ``` + ```yaml + backend: + name: bitbucket + repo: owner-name/repo-name # Path to your Bitbucket repository + ``` ### Client-Side Implicit Grant (Bitbucket) With Bitbucket's Implicit Grant, users can authenticate with Bitbucket directly from the client. To do this: -1. Follow the [Atlassian docs](https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html) to create an OAuth consumer. Make sure you allow `Account/Read` and `Repository/Write` permissions. For the **Callback URL**, enter the address where you access Netlify CMS, for example, `https://www.mysite.com/admin/`. +1. Follow the [Atlassian docs](https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html) to create an OAuth consumer. Make sure you allow `Account/Read` and `Repository/Write` permissions. To use the [Editorial Workflow](https://www.netlifycms.org/docs/configuration-options/#publish-mode), allow `PullRequests/Write` permissions. For the **Callback URL**, enter the address where you access Netlify CMS, for example, `https://www.mysite.com/admin/`. 2. Bitbucket gives you a **Key**. Copy this Key and enter it in your Netlify CMS `config.yml` file, along with the following settings: - ```yaml - backend: - name: bitbucket - repo: owner-name/repo-name - branch: default - auth_type: implicit - app_id: # The Key from your Bitbucket settings - ``` + ```yaml + backend: + name: bitbucket + repo: owner-name/repo-name + branch: default + auth_type: implicit + app_id: # The Key from your Bitbucket settings + ``` **Warning:** With Bitbucket implicit grant, the authentication is valid for 1 hour only. After that, the user has to login again, **which can lead to data loss** if the expiration occurs while content is being edited.