File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -76,8 +76,14 @@ set -o pipefail
7676echo " Running: git rev-parse refs/heads/repo-HEAD-saved"
7777saved_ref=$( git rev-parse refs/heads/repo-HEAD-saved) ||
7878 die " Failed to read local ref refs/heads/repo-HEAD-saved"
79+
80+ git_url=" $DEFAULT_PACKAGE_GIT_URL "
81+ if [[ -n " $FETCH_GIT_TOKEN " ]] && [[ " $git_url " == https://github.com/* ]]; then
82+ git_url=" ${git_url/ https: \/\/ / https: \/\/ ${FETCH_GIT_TOKEN} @ } "
83+ fi
84+
7985echo " Running: git ls-remote $DEFAULT_PACKAGE_GIT_URL refs/heads/$DEFAULT_GIT_BRANCH "
80- remote_ref=$( git ls-remote " $DEFAULT_PACKAGE_GIT_URL " " refs/heads/$DEFAULT_GIT_BRANCH " |
86+ remote_ref=$( git ls-remote " $git_url " " refs/heads/$DEFAULT_GIT_BRANCH " |
8187 awk ' {print $1}' ) ||
8288 die " Failed to read remote ref refs/heads/$DEFAULT_GIT_BRANCH "
8389set +o pipefail
You can’t perform that action at this time.
0 commit comments