Skip to content
This repository was archived by the owner on Jun 6, 2024. It is now read-only.

Commit 464df56

Browse files
committed
Smart Edge Open 22.03 release
1 parent dfb0d7f commit 464df56

File tree

1 file changed

+20
-5
lines changed

1 file changed

+20
-5
lines changed

files/seo/provision_seo_common.sh

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,14 +49,29 @@ rm -rf /tmp/seo.service.tpl /tmp/seo_deploy.sh.tpl
4949
systemctl 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+
5260
rm -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]}//"
5563
fi
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}"
5969
fi
70+
71+
if [ -n "${credentials}" ]; then
72+
git config --global --remove-section url."${url_split[0]}//${credentials}@"
73+
fi
74+
6075
cd "${ek_path}"
6176

6277
# shellcheck disable=SC1090

0 commit comments

Comments
 (0)