> For the complete documentation index, see [llms.txt](https://docs.portainer.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.portainer.io/faqs/troubleshooting/stacks-deployments-and-updates/how-do-i-configure-portainers-gitops-features-to-authenticate-to-a-bitbucket-repository.md).

# How do I configure Portainer's GitOps features to authenticate to a Bitbucket repository?

{% hint style="info" %}
The following instructions acknowledge that Bitbucket has announced the [deprecation of app passwords in Bitbucket Cloud](https://www.atlassian.com/blog/bitbucket/bitbucket-cloud-transitions-to-api-tokens-enhancing-security-with-app-password-deprecation).
{% endhint %}

When deploying a stack from a private Bitbucket repository, the authentication method will differ depending on how your Bitbucket is hosted.

* **Bitbucket Cloud:** Use an [**API token**](https://support.atlassian.com/bitbucket-cloud/docs/api-tokens/) or [**access token**](https://support.atlassian.com/bitbucket-cloud/docs/access-tokens/) with **basic authentication**. The token must have read access to the repository.
* **Bitbucket Data Center:** Use a [**Personal Access Token**](https://confluence.atlassian.com/bitbucketserver/http-access-tokens-939515499.html) with **bearer token authentication.** The token must have read access to the repository.
