Skip to content

Commit f9c2fe9

Browse files
authored
Update install-script.sh
Programming error when using git with login data. Incorrect assembly of the URL.
1 parent 6cb70f5 commit f9c2fe9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

install-script.sh

+7-1
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,14 @@ else
4040
# If username and access token are provided, use authenticated access
4141
if [ -n "${USERNAME}" ] && [ -n "${ACCESS_TOKEN}" ]; then
4242
echo "[Git] Using authenticated Git access."
43+
44+
# Extract the domain and the rest of the URL, ensuring the correct format
4345
GIT_DOMAIN=$(echo "${GIT_ADDRESS}" | cut -d/ -f3)
44-
GIT_ADDRESS="https://${USERNAME}:${ACCESS_TOKEN}@${GIT_DOMAIN}$(echo ${GIT_ADDRESS} | cut -d/ -f4-)"
46+
GIT_REPO=$(echo "${GIT_ADDRESS}" | cut -d/ -f4-) # Rest of the URL after the domain
47+
48+
# Construct the authenticated Git URL
49+
GIT_ADDRESS="https://${USERNAME}:${ACCESS_TOKEN}@${GIT_DOMAIN}/${GIT_REPO}"
50+
4551
echo "[Git] Updated GIT_ADDRESS for authenticated access: ${GIT_ADDRESS}"
4652
else
4753
echo "[Git] Using anonymous Git access."

0 commit comments

Comments
 (0)