Skip to content

Commit a3549fa

Browse files
Update bito-cra.ps1
- Handle long char git access token in bitbucket
1 parent 5bb2f5e commit a3549fa

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cra-scripts/bito-cra.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -700,6 +700,10 @@ if ($mode -eq "server") {
700700
if (-not([string]::IsNullOrEmpty($props[$param_bito_access_key])) -and -not([string]::IsNullOrEmpty($props[$param_git_access_token]))) {
701701
if ($props[$param_git_provider] -eq "BITBUCKET") {
702702
$git_secret = $props[$param_git_access_token]
703+
# Truncate if longer than 60 characters
704+
if ($git_secret.Length -gt 60) {
705+
$git_secret = $git_secret.Substring(0, 60)
706+
}
703707
} else {
704708
$git_secret = "$($props[$param_bito_access_key])@#~^$($props[$param_git_access_token])"
705709
}

0 commit comments

Comments
 (0)