git: auto_clone: fix remote url
This commit is contained in:
parent
5dcf01eff2
commit
00340a3631
@ -5,8 +5,9 @@ page=1
|
||||
project_dir="$HOME/projects"
|
||||
|
||||
base_url="https://gitea.finnvanreenen.nl/api/v1"
|
||||
git_url="git@gitea.finnvanreenen.nl"
|
||||
|
||||
while [[ $page -lt 21 ]]
|
||||
while [[ $page -lt 50 ]]
|
||||
do
|
||||
# echo
|
||||
echo "## get repo list page $page"
|
||||
@ -30,6 +31,7 @@ do
|
||||
else
|
||||
url="$(echo "$clone_url" | sed "s|://|://$login:$token@|")"
|
||||
git clone "$url" "$project_dir/${full_name,,}"
|
||||
git -C "$project_dir/${full_name,,}" remote set-url origin "$git_url:${full_name,,}.git"
|
||||
fi
|
||||
|
||||
done
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user