Skip to main content

Authentication

The available authentication methods depend on whether you connect to Bitbucket Cloud or Bitbucket Data Center.

OAuth2 (Cloud)

  1. When prompted to authenticate, your default browser opens a Bitbucket authorization page.
  2. Log in to your Bitbucket account (if not already logged in) and grant access to the plugin.
  3. Close the browser tab and return to the IDE — the credentials are stored automatically.

The plugin automatically refreshes your OAuth2 token in the background. If the refresh fails, you will be prompted to re-authenticate.

Completing Authorization Manually

If the local callback cannot be reached (for example, it is blocked by a firewall, or you are signing in on a different machine), select Retrieve Auth Code Manually when prompted. The plugin then guides you through the following steps:

  1. The authorization link is copied to your clipboard. Paste it into any browser.
  2. Sign in and authorize the plugin.
  3. The browser redirects to a localhost page that shows an error — this is expected.
  4. Copy the entire URL from the browser's address bar and paste it back into the plugin.

API Tokens (Cloud)

Use OAuth2 to connect to Bitbucket Cloud: the plugin does not support API tokens, Atlassian's replacement for app passwords, because of gaps in Atlassian's own Bitbucket Cloud API. We can add support once those gaps are closed — see Missing Public APIs in Bitbucket Cloud, where voting for the issues helps.

Username and Password (Data Center)

Enter your Bitbucket Data Center username and password when prompted.

HTTP Access Token (Data Center)

  1. In Bitbucket Data Center, go to your ProfileManage AccountHTTP access tokens.
  2. Click Create token, give it a name, and grant it Repository write permission.
  3. Copy the generated token.
  4. When the plugin prompts for authentication, select HTTP Access Token and paste the token.

Changing Account

To switch to a different Bitbucket account or change the authentication method, use the Change Account action in the Bitbucket Pull Requests tool window toolbar.

Default Account

Check Use this account for other projects by default when logging in to reuse these credentials in any new project that connects to the same Bitbucket instance.

Credential Storage

All credentials are stored securely in the IDE's built-in credential store (Settings | Appearance & Behavior | System Settings | Passwords). No passwords or tokens are stored in plain text or in project files.