Files
.github
.storybook
__mocks__
cypress
dev-test
functions
img
packages
scripts
website
content
blog
docs
widgets
add-to-your-site.md
architecture.md
azure-backend.md
backends-overview.md
beta-features.md
bitbucket-backend.md
cloudinary.md
collection-types.md
configuration-options.md
contributor-guide.md
custom-widgets.md
customization.md
deploy-preview-links.md
examples.md
external-oauth-clients.md
gatsby.md
git-gateway-backend.md
github-backend.md
gitlab-backend.md
gridsome.md
hugo.md
intro.md
jekyll.md
middleman.md
netlify-large-media.md
nextjs.md
nuxt.md
open-authoring.md
releases.md
site-generator-overview.md
start-with-a-template.md
test-backend.md
uploadcare.md
widgets.md
writing-style-guide.md
pages
.keep
data
src
static
.babelrc
.gitignore
.markdownlint.json
.nvmrc
README.md
gatsby-browser.js
gatsby-config.js
gatsby-node.js
netlify.toml
package.json
site.yml
yarn.lock
.all-contributorsrc
.editorconfig
.eslintrc.js
.gitattributes
.gitignore
.nvmrc
.prettierignore
.prettierrc
.stylelintrc
.vale.ini
CHANGELOG.md
CODE_OF_CONDUCT.md
CONTRIBUTING.md
LICENSE
README.md
babel.config.js
cms.png
commitlint.config.js
cypress.json
jest.config.js
lerna.json
netlify.toml
package.json
renovate.json
setupTestFramework.js
tsconfig.json
yarn.lock
36 lines
1.8 KiB
Markdown
36 lines
1.8 KiB
Markdown
---
|
|
group: Accounts
|
|
weight: 20
|
|
title: Bitbucket
|
|
---
|
|
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:
|
|
|
|
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
|
|
```
|
|
|
|
### 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. 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
|
|
```
|
|
|
|
**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.
|