File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 40
40
# If username and access token are provided, use authenticated access
41
41
if [ -n " ${USERNAME} " ] && [ -n " ${ACCESS_TOKEN} " ]; then
42
42
echo " [Git] Using authenticated Git access."
43
+
44
+ # Extract the domain and the rest of the URL, ensuring the correct format
43
45
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
+
45
51
echo " [Git] Updated GIT_ADDRESS for authenticated access: ${GIT_ADDRESS} "
46
52
else
47
53
echo " [Git] Using anonymous Git access."
You can’t perform that action at this time.
0 commit comments