This repository was archived by the owner on Jun 6, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +20
-5
lines changed
Expand file tree Collapse file tree 1 file changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -49,14 +49,29 @@ rm -rf /tmp/seo.service.tpl /tmp/seo_deploy.sh.tpl
4949systemctl enable seo
5050
5151# Clone Experience Kit
52+ IFS=" /" read -r -a url_split <<< " $url"
53+
54+ if [ -n " ${git_user} " ] && [ -n " ${git_password} " ]; then
55+ credentials=" ${git_user} :${git_password} "
56+ else
57+ credentials=" ${git_user}${git_password} "
58+ fi
59+
5260rm -rf " ${ek_path} "
53- if [ -n " ${gh_token } " ]; then
54- git config --global url." https: //${gh_token} @github.com " .insteadOf https://github.com
61+ if [ -n " ${credentials } " ]; then
62+ git config --global url." ${url_split[0]} //${credentials} @ " .insteadOf " ${url_split[0]} // "
5563fi
56- git clone --branch " ${branch} " --recursive " https://${url} " " ${ek_path} "
57- if [ -n " ${gh_token} " ]; then
58- git config --global --remove-section url." https://${gh_token} @github.com"
64+
65+ if ! (git clone --branch " ${branch} " --recursive " ${url} " " ${ek_path} " ) then
66+ # Workaround for no_proxy issue.
67+ export no_proxy=" ${no_proxy} ,${url_split[2]} "
68+ git clone --branch " ${branch} " --recursive " ${url} " " ${ek_path} "
5969fi
70+
71+ if [ -n " ${credentials} " ]; then
72+ git config --global --remove-section url." ${url_split[0]} //${credentials} @"
73+ fi
74+
6075cd " ${ek_path} "
6176
6277# shellcheck disable=SC1090
You can’t perform that action at this time.
0 commit comments