diff --git a/src/freedombone-trove b/src/freedombone-trove index 450c0767..22562b8b 100755 --- a/src/freedombone-trove +++ b/src/freedombone-trove @@ -164,13 +164,22 @@ function sync_trove_repos { fi fi if [ ! -d /home/trove/${trove_name} ]; then - git clone --mirror ${repo_url} /home/trove/${trove_name} + if [[ ${repo_url} != 'ssh:'* ]]; then + git clone --mirror ${repo_url} /home/trove/${trove_name} + else + sshpass -p "$FRIENDS_TROVE_PASSWORD" git clone --mirror ${repo_url} /home/trove/${trove_name} + fi if [ ! -d /home/trove/${trove_name} ]; then echo $"WARNING: failed to mirror repo ${repo_url}" fi else cd /home/trove/${trove_name} - git fetch -p origin + git remote set-url origin ${repo_url} + if [[ ${repo_url} != 'ssh:'* ]]; then + git fetch -p origin + else + sshpass -p "$FRIENDS_TROVE_PASSWORD" git fetch -p origin + fi fi done chown -R trove:trove /home/trove