Skip to main content

Interface: BitbucketOptions

Bitbucket options. https://bitbucket.org/ Define BITBUCKET_TOKEN environment variable.

Bitbucket Cloud is retiring app passwords in favor of API tokens and access tokens. Authentication is selected by whether a username is provided:

  • With username — the token is sent via HTTP Basic auth. Use a Bitbucket username + app password, or an Atlassian account email + API token.
  • Without username — the token is sent as a repository/project/workspace access token via Bearer auth.

For the auto-updater on a private repository, pass the matching header to autoUpdater.addAuthHeader(...):

// access token (no username)
autoUpdater.addAuthHeader(`Bearer ${token}`)
// app password or API token (with username)
autoUpdater.addAuthHeader(`Basic ${Buffer.from(`${username}:${token}`).toString("base64")}`)

Extends​

Properties​

channel?​

readonly optional channel?: string | null

The channel.

Default​

latest

maxUpdateInfoSize?​

readonly optional maxUpdateInfoSize?: number | null

The largest channel file (latest*.yml) electron-updater reads, in bytes: it is read into memory and parsed before anything verifies it. A larger one fails the update check with ERR_UPDATER_RESPONSE_TOO_LARGE. Release feeds and provider API responses (release listings and lookups) are not limited. Written into app-update.yml, so installed apps use it; autoUpdater.maxUpdateInfoSize overrides it at runtime. A positive integer, or 0 for no limit.

Default​

10485760

Inherited from​

PublishConfiguration.maxUpdateInfoSize


owner​

readonly owner: string

Repository owner


provider​

readonly provider: "bitbucket"

The provider. Must be bitbucket.

Overrides​

PublishConfiguration.provider


publishAutoUpdate?​

readonly optional publishAutoUpdate?: boolean

Whether to publish auto update info files.

Auto update relies only on the first provider in the list (you can specify several publishers). Thus, probably, theres no need to upload the metadata files for the other configured providers. But by default will be uploaded. A provider with falsenever becomes the feed embedded inapp-update.yml` while a later provider receives the metadata: the first provider that does is embedded instead.

Default​

true

Inherited from​

PublishConfiguration.publishAutoUpdate


requestHeaders?​

readonly optional requestHeaders?: OutgoingHttpHeaders

Any custom request headers

Inherited from​

PublishConfiguration.requestHeaders


slug​

readonly slug: string

Repository slug/name


timeout?​

readonly optional timeout?: number | null

Request timeout in milliseconds. (Default is 2 minutes; O is ignored)

Default​

120000

Inherited from​

PublishConfiguration.timeout


token?​

readonly optional token?: string | null

The token to support auto-update from private bitbucket repositories. Depending on username, this is a Bitbucket app password, an Atlassian API token, or a repository/project/workspace access token.


username?​

readonly optional username?: string | null

The user name to support auto-update from private bitbucket repositories. Provide a Bitbucket username (for an app password) or an Atlassian account email (for an API token) to authenticate with HTTP Basic auth. Leave unset to send token as a Bearer access token.