From 0fc2b7ee6aaf80b96672241dd3dc6ddd4a8d0032 Mon Sep 17 00:00:00 2001 From: Brendan Golden Date: Wed, 27 Dec 2023 21:20:36 +0000 Subject: [PATCH] fix: had incorrect token parms --- sync/sync.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sync/sync.sh b/sync/sync.sh index 7fbc83e..ea9902e 100644 --- a/sync/sync.sh +++ b/sync/sync.sh @@ -17,14 +17,13 @@ Mirror-Create(){ # make sure the values are clean of extra characters local ID=${1} local REPO_TMP=$(tr -d '\n\t\r ' <<<"${2}" ) - local token=$(tr -d '\n\t\r ' <<<"$TOKEN" ) local REPO=${REPO_TMP#"https://"} - local body="url=https://oauth2:$token@$REPO&enabled=true&only_protected_branches=false&keep_divergent_refs=false" + local body="url=https://oauth2:$TOKEN_REMOTE@$REPO&enabled=true&only_protected_branches=false&keep_divergent_refs=false" local uri="https://gitlab.skynet.ie/api/v4/projects/$id/remote_mirrors" echo $uri local tmp="" - curl -sS -X "POST" "$uri" --header "PRIVATE-TOKEN: $token" --data $body > tmp + curl -sS -X "POST" "$uri" --header "PRIVATE-TOKEN: $TOKEN" --data $body > tmp } Main() {