From 851f7ac0440920b7e164e69645129c7f087a2ca6 Mon Sep 17 00:00:00 2001 From: Joseph Le Date: Fri, 13 Oct 2023 17:51:31 +1100 Subject: [PATCH] update auto auth --- service/giteaService.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/service/giteaService.sh b/service/giteaService.sh index 5e3be95..2c77b0d 100755 --- a/service/giteaService.sh +++ b/service/giteaService.sh @@ -3,7 +3,8 @@ # Đường dẫn tới tệp index.js indexjs_path=$HOOK_PATH/index.js project_path=$HOOK_PATH -REPOSITORY_AUTH="https://$GIT_USERNAME:$GIT_PASSWORD@$(echo $GIT_REPOSITORY | sed 's#https://##')" +PASSWORD=$(echo "$GIT_PASSWORD" | sed 's/@/%40/g') +REPOSITORY_AUTH="https://$GIT_USERNAME:$PASSWORD@$(echo $GIT_REPOSITORY | sed 's#https://##')" cd "$PROJECT_PATH" && SET_ORIGIN=$(git remote set-url origin $REPOSITORY_AUTH)