Skip to content

Commit b44ec7f

Browse files
Update bito-cra.sh
- added char limit check while creating secret
1 parent a3549fa commit b44ec7f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cra-scripts/bito-cra.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -727,6 +727,10 @@ if [ "$mode" == "server" ]; then
727727
if [ -n "${props[$param_bito_access_key]}" ] && [ -n "${props[$param_git_access_token]}" ]; then
728728
if [[ "${props[$param_git_provider]}" == "BITBUCKET" ]]; then
729729
git_secret="${props[$param_git_access_token]}"
730+
# Truncate only for Bitbucket if longer than 60 characters
731+
if [ ${#git_secret} -gt 60 ]; then
732+
git_secret="${git_secret:0:60}"
733+
fi
730734
else
731735
git_secret="${props[$param_bito_access_key]}@#~^${props[$param_git_access_token]}"
732736
fi

0 commit comments

Comments
 (0)