Use ssh password when mirroring
This commit is contained in:
parent
92634e34ab
commit
ef3f16d065
|
@ -164,13 +164,22 @@ function sync_trove_repos {
|
|||
fi
|
||||
fi
|
||||
if [ ! -d /home/trove/${trove_name} ]; then
|
||||
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 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
|
||||
|
|
Loading…
Reference in New Issue