fix: had incorrect token parms
This commit is contained in:
parent
07601f708c
commit
0fc2b7ee6a
1 changed files with 2 additions and 3 deletions
|
@ -17,14 +17,13 @@ Mirror-Create(){
|
||||||
# make sure the values are clean of extra characters
|
# make sure the values are clean of extra characters
|
||||||
local ID=${1}
|
local ID=${1}
|
||||||
local REPO_TMP=$(tr -d '\n\t\r ' <<<"${2}" )
|
local REPO_TMP=$(tr -d '\n\t\r ' <<<"${2}" )
|
||||||
local token=$(tr -d '\n\t\r ' <<<"$TOKEN" )
|
|
||||||
local REPO=${REPO_TMP#"https://"}
|
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"
|
local uri="https://gitlab.skynet.ie/api/v4/projects/$id/remote_mirrors"
|
||||||
echo $uri
|
echo $uri
|
||||||
local tmp=""
|
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() {
|
Main() {
|
||||||
|
|
Loading…
Reference in a new issue