























@@ -416,8 +416,6 @@ jobs:
416416 set -euo pipefail
417417418418 workdir="$GITHUB_WORKSPACE"
419- auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')"
420-421419 reset_checkout_dir() {
422420 mkdir -p "$workdir"
423421 find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
@@ -429,12 +427,11 @@ jobs:
429427 reset_checkout_dir
430428 git init "$workdir" >/dev/null
431429 git config --global --add safe.directory "$workdir"
432- git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
430+ git -C "$workdir" remote add origin "https://x-access-token:${CHECKOUT_TOKEN}@github.com/${CHECKOUT_REPO}.git"
433431 git -C "$workdir" config gc.auto 0
434432435433 timeout --signal=TERM 30s git -C "$workdir" \
436434 -c protocol.version=2 \
437- -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \
438435 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
439436 "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
440437@@ -627,8 +624,6 @@ jobs:
627624 set -euo pipefail
628625629626 workdir="$GITHUB_WORKSPACE"
630- auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')"
631-632627 reset_checkout_dir() {
633628 mkdir -p "$workdir"
634629 find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
@@ -640,12 +635,11 @@ jobs:
640635 reset_checkout_dir
641636 git init "$workdir" >/dev/null
642637 git config --global --add safe.directory "$workdir"
643- git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
638+ git -C "$workdir" remote add origin "https://x-access-token:${CHECKOUT_TOKEN}@github.com/${CHECKOUT_REPO}.git"
644639 git -C "$workdir" config gc.auto 0
645640646641 timeout --signal=TERM 30s git -C "$workdir" \
647642 -c protocol.version=2 \
648- -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \
649643 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
650644 "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
651645@@ -717,8 +711,6 @@ jobs:
717711 set -euo pipefail
718712719713 workdir="$GITHUB_WORKSPACE"
720- auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')"
721-722714 reset_checkout_dir() {
723715 mkdir -p "$workdir"
724716 find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
@@ -730,12 +722,11 @@ jobs:
730722 reset_checkout_dir
731723 git init "$workdir" >/dev/null
732724 git config --global --add safe.directory "$workdir"
733- git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
725+ git -C "$workdir" remote add origin "https://x-access-token:${CHECKOUT_TOKEN}@github.com/${CHECKOUT_REPO}.git"
734726 git -C "$workdir" config gc.auto 0
735727736728 timeout --signal=TERM 30s git -C "$workdir" \
737729 -c protocol.version=2 \
738- -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \
739730 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
740731 "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
741732@@ -801,8 +792,6 @@ jobs:
801792 set -euo pipefail
802793803794 workdir="$GITHUB_WORKSPACE"
804- auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')"
805-806795 reset_checkout_dir() {
807796 mkdir -p "$workdir"
808797 find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
@@ -814,12 +803,11 @@ jobs:
814803 reset_checkout_dir
815804 git init "$workdir" >/dev/null
816805 git config --global --add safe.directory "$workdir"
817- git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
806+ git -C "$workdir" remote add origin "https://x-access-token:${CHECKOUT_TOKEN}@github.com/${CHECKOUT_REPO}.git"
818807 git -C "$workdir" config gc.auto 0
819808820809 timeout --signal=TERM 30s git -C "$workdir" \
821810 -c protocol.version=2 \
822- -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \
823811 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
824812 "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
825813@@ -882,8 +870,6 @@ jobs:
882870 set -euo pipefail
883871884872 workdir="$GITHUB_WORKSPACE"
885- auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')"
886-887873 reset_checkout_dir() {
888874 mkdir -p "$workdir"
889875 find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
@@ -895,12 +881,11 @@ jobs:
895881 reset_checkout_dir
896882 git init "$workdir" >/dev/null
897883 git config --global --add safe.directory "$workdir"
898- git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
884+ git -C "$workdir" remote add origin "https://x-access-token:${CHECKOUT_TOKEN}@github.com/${CHECKOUT_REPO}.git"
899885 git -C "$workdir" config gc.auto 0
900886901887 timeout --signal=TERM 30s git -C "$workdir" \
902888 -c protocol.version=2 \
903- -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \
904889 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
905890 "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
906891@@ -961,8 +946,6 @@ jobs:
961946 set -euo pipefail
962947963948 workdir="$GITHUB_WORKSPACE"
964- auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')"
965-966949 reset_checkout_dir() {
967950 mkdir -p "$workdir"
968951 find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
@@ -974,12 +957,11 @@ jobs:
974957 reset_checkout_dir
975958 git init "$workdir" >/dev/null
976959 git config --global --add safe.directory "$workdir"
977- git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
960+ git -C "$workdir" remote add origin "https://x-access-token:${CHECKOUT_TOKEN}@github.com/${CHECKOUT_REPO}.git"
978961 git -C "$workdir" config gc.auto 0
979962980963 timeout --signal=TERM 30s git -C "$workdir" \
981964 -c protocol.version=2 \
982- -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \
983965 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
984966 "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
985967@@ -1087,8 +1069,6 @@ jobs:
10871069 set -euo pipefail
1088107010891071 workdir="$GITHUB_WORKSPACE"
1090- auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')"
1091-10921072 reset_checkout_dir() {
10931073 mkdir -p "$workdir"
10941074 find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
@@ -1100,12 +1080,11 @@ jobs:
11001080 reset_checkout_dir
11011081 git init "$workdir" >/dev/null
11021082 git config --global --add safe.directory "$workdir"
1103- git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
1083+ git -C "$workdir" remote add origin "https://x-access-token:${CHECKOUT_TOKEN}@github.com/${CHECKOUT_REPO}.git"
11041084 git -C "$workdir" config gc.auto 0
1105108511061086 timeout --signal=TERM 30s git -C "$workdir" \
11071087 -c protocol.version=2 \
1108- -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \
11091088 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
11101089 "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
11111090@@ -1221,8 +1200,6 @@ jobs:
12211200 set -euo pipefail
1222120112231202 workdir="$GITHUB_WORKSPACE"
1224- auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')"
1225-12261203 reset_checkout_dir() {
12271204 mkdir -p "$workdir"
12281205 find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
@@ -1234,12 +1211,11 @@ jobs:
12341211 reset_checkout_dir
12351212 git init "$workdir" >/dev/null
12361213 git config --global --add safe.directory "$workdir"
1237- git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
1214+ git -C "$workdir" remote add origin "https://x-access-token:${CHECKOUT_TOKEN}@github.com/${CHECKOUT_REPO}.git"
12381215 git -C "$workdir" config gc.auto 0
1239121612401217 timeout --signal=TERM 30s git -C "$workdir" \
12411218 -c protocol.version=2 \
1242- -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \
12431219 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
12441220 "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
12451221@@ -1374,8 +1350,6 @@ jobs:
13741350 set -euo pipefail
1375135113761352 workdir="$GITHUB_WORKSPACE"
1377- auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')"
1378-13791353 reset_checkout_dir() {
13801354 mkdir -p "$workdir"
13811355 find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
@@ -1387,12 +1361,11 @@ jobs:
13871361 reset_checkout_dir
13881362 git init "$workdir" >/dev/null
13891363 git config --global --add safe.directory "$workdir"
1390- git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
1364+ git -C "$workdir" remote add origin "https://x-access-token:${CHECKOUT_TOKEN}@github.com/${CHECKOUT_REPO}.git"
13911365 git -C "$workdir" config gc.auto 0
1392136613931367 timeout --signal=TERM 30s git -C "$workdir" \
13941368 -c protocol.version=2 \
1395- -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \
13961369 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
13971370 "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
13981371@@ -1725,8 +1698,6 @@ jobs:
17251698 set -euo pipefail
1726169917271700 workdir="$GITHUB_WORKSPACE"
1728- auth_header="$(printf 'x-access-token:%s' "$CHECKOUT_TOKEN" | base64 | tr -d '\n')"
1729-17301701 reset_checkout_dir() {
17311702 mkdir -p "$workdir"
17321703 find "$workdir" -mindepth 1 -maxdepth 1 -exec rm -rf {} +
@@ -1738,12 +1709,11 @@ jobs:
17381709 reset_checkout_dir
17391710 git init "$workdir" >/dev/null
17401711 git config --global --add safe.directory "$workdir"
1741- git -C "$workdir" remote add origin "https://github.com/${CHECKOUT_REPO}"
1712+ git -C "$workdir" remote add origin "https://x-access-token:${CHECKOUT_TOKEN}@github.com/${CHECKOUT_REPO}.git"
17421713 git -C "$workdir" config gc.auto 0
1743171417441715 timeout --signal=TERM 30s git -C "$workdir" \
17451716 -c protocol.version=2 \
1746- -c "http.https://github.com/.extraheader=AUTHORIZATION: basic ${auth_header}" \
17471717 fetch --no-tags --prune --no-recurse-submodules --depth=1 origin \
17481718 "+${CHECKOUT_SHA}:refs/remotes/origin/ci-target" || return 1
17491719此內容由慣性聚合(RSS閱讀器)自動聚合整理,僅供閱讀參考。 原文來自 — 版權歸原作者所有。