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
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -181,6 +181,17 @@ You can also pass the `--progress` flag to display a progress bar when upload/do
181
181
182
182
By default, the password or client secret is stored in the vault of the operating system (Windows Credential Manager, macOS Keychain, or Linux Secret Service). You can pass the `--no-vault` flag to disable this feature and store the password or client secret in plain text in the configuration file. This is not recommended, but can be useful for testing purposes.
183
183
184
+
To connect to a Bitbucket Data Center, you can pass the `--host` flag to set the host of the Bitbucket instance (do not provide any host when connecting to bitbucket.org). For example:
185
+
186
+
```bash
187
+
bb profile create \
188
+
--name myprofile \
189
+
--host bitbucket.mycompany.com \
190
+
--client-id <your-client-id> \
191
+
--client-secret <your-client-secret> \
192
+
--callback-port 8080
193
+
```
194
+
184
195
Profiles support the following authentications:
185
196
186
197
-[OAuth 2.0 with Authorization Code Grant](https://developer.atlassian.com/cloud/bitbucket/rest/intro/#1--authorization-code-grant--4-1-) with the `--client-id`, `--client-secret`, and `--callback-port` flags.
Copy file name to clipboardExpand all lines: cmd/profile/create.go
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@ package profile
2
2
3
3
import (
4
4
"fmt"
5
+
"net/url"
5
6
"os"
6
7
"path/filepath"
7
8
"runtime"
@@ -24,6 +25,7 @@ var createCmd = &cobra.Command{
24
25
25
26
varcreateOptionsstruct {
26
27
Profile
28
+
Hoststring
27
29
DefaultWorkspace*flags.EnumFlag
28
30
DefaultProject*flags.EnumFlag
29
31
OutputFormat*flags.EnumFlag
@@ -45,6 +47,7 @@ func init() {
45
47
createCmd.Flags().StringVar(&createOptions.VaultKey, "vault-key", "bitbucket-cli", "Vault key to use for storing credentials. Default is bitbucket-cli. On Windows, the Windows Credential Manager will be used, On Linux and macOS, the system keychain will be used.")
46
48
}
47
49
createCmd.Flags().BoolVar(&createOptions.NoVault, "no-vault", false, "Do not store credentials in the vault. This will store them in plain text in the configuration file.")
50
+
createCmd.Flags().StringVar(&createOptions.Host, "host", "", "Host of the Bitbucket API when using Bitbucket Data Center. For Bitbucket Cloud, this should be left empty.")
48
51
createCmd.Flags().StringVarP(&createOptions.User, "user", "u", "", "User's name of the profile")
49
52
createCmd.Flags().StringVar(&createOptions.Password, "password", "", "Password of the profile")
50
53
createCmd.Flags().StringVar(&createOptions.ClientID, "client-id", "", "Client ID of the profile")
Copy file name to clipboardExpand all lines: cmd/profile/update.go
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@ package profile
2
2
3
3
import (
4
4
"fmt"
5
+
"net/url"
5
6
"os"
6
7
"path/filepath"
7
8
"runtime"
@@ -25,6 +26,7 @@ var updateCmd = &cobra.Command{
25
26
26
27
varupdateOptionsstruct {
27
28
Profile
29
+
Hoststring
28
30
DefaultWorkspace*flags.EnumFlag
29
31
DefaultProject*flags.EnumFlag
30
32
OutputFormat*flags.EnumFlag
@@ -44,6 +46,7 @@ func init() {
44
46
ifruntime.GOOS!="windows" {
45
47
updateCmd.Flags().StringVar(&updateOptions.VaultKey, "vault-key", "bitbucket-cli", "Vault key to use for storing credentials. Default is bitbucket-cli. On Windows, the Windows Credential Manager will be used, On Linux and macOS, the system keychain will be used.")
46
48
}
49
+
updateCmd.Flags().StringVar(&updateOptions.Host, "host", "", "Host of the Bitbucket API when using Bitbucket Data Center. For Bitbucket Cloud, this should be left empty.")
47
50
updateCmd.Flags().StringVarP(&updateOptions.User, "user", "u", "", "User's name of the profile")
48
51
updateCmd.Flags().StringVar(&updateOptions.Password, "password", "", "Password of the profile")
49
52
updateCmd.Flags().StringVar(&updateOptions.ClientID, "client-id", "", "Client ID of the profile")
0 commit comments