You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The configuration of Bitbucket plugin (for both _Bitbucket Multibranch_ projects and _Bitbucket Team/Project_) has
102
+
The configuration of the plugin (for both _Bitbucket Multibranch_ projects and _Bitbucket Team/Project_) has
103
103
two credentials to configure:
104
104
105
-
. *Scan Credentials*: credentials used to access Bitbucket API in order to discover repositories, branches and pull requests.
106
-
If not set then anonymous access is used, so only public repositories, branches and pull requests are discovered and managed. Note that the
107
-
Webhooks auto-register feature requires scan credentials to be set. Only HTTP or OAuth credentials are accepted in this field.
108
-
. *Checkout Credentials*: credentials used to check out sources once the repository, branch or pull request is discovered. HTTP, SSH and OAuth credentials
109
-
are allowed. If not set then _Scan Credentials_ are used.
105
+
. *Scan Credentials*: Credentials used to access Bitbucket API in order to discover repositories, branches and pull requests.
106
+
If not set then anonymous access is used, so only public repositories, branches and pull requests are discovered and managed.
107
+
Note that the Webhooks auto-register feature requires scan credentials to be set.
108
+
HTTP Basic Authentication, Access Token and OAuth credentials are supported.
109
+
. *Checkout Credentials*: Credentials used to check out sources once the repository, branch or pull request is discovered.
110
+
HTTP Basic Authentication, SSH and OAuth credentials are supported.
111
+
If not set then _Scan Credentials_ are used.
110
112
111
113
image::images/screenshot-3.png[scaledwidth=90%]
112
114
115
+
=== Access Token
116
+
117
+
The plugin can make use of an access token (Bitbucket Server only) instead of the standard username/password.
118
+
119
+
First create a new _personal access token_ in Bitbucket as instructed in the https://confluence.atlassian.com/bitbucketserver0716/personal-access-tokens-1086402495.html[Bitbucket Personal Access Tokens Documentation].
120
+
At least allow _read_ access for repositories. If you want the plugin to install the webhooks, allow _admin_ access for repositories.
121
+
122
+
Then create new _Secret text credentials_ in Jenkins and enter the Bitbucket personal access token value in the _Secret_ field.
123
+
124
+
When configuring a multi-branch project, add the _Checkout over SSH_ behavior to a branch source, as the token can only be used for the Bitbucket API.
125
+
113
126
=== OAuth credentials
114
127
115
-
Bitbucket plugin can make use of OAuth credentials instead of the standard username/password.
128
+
The plugin can make use of OAuth credentials (Bitbucket Cloud only) instead of the standard username/password.
116
129
117
-
First create a new OAuth consumer as instructed in https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html[Bitbucket OAuth Documentation].
118
-
Don't forget to check _This is a private consumer_ and at least allow read access to the repositories and Pull requests. If you want the Bitbucket to install the Webhooks also allow the read and write access of the Webhooks
130
+
First create a new _OAuth consumer_ in Bitbucket as instructed in the https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html[Bitbucket OAuth Documentation].
131
+
Don't forget to check _This is a private consumer_ and at least allow _read_ access for repositories and pull requests. If you want the plugin to install the webhooks, also allow _read_ and _write_ access for webhooks.
119
132
120
133
image::images/screenshot-10.png[scaledwidth=90%]
121
134
122
-
Then create new _Username with password credentials_, enter the Bitbucket OAuth consumer key in _Username_ field and the Bitbucket OAuth consumer secret in _Password_ field
135
+
Then create new _Username with password credentials_ in Jenkins, enter the Bitbucket OAuth consumer key in the _Username_ field and the Bitbucket OAuth consumer secret in the _Password_ field.
0 commit comments