Use ssh password when mirroring
This commit is contained in:
parent
92634e34ab
commit
ef3f16d065
|
@ -164,13 +164,22 @@ function sync_trove_repos {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ ! -d /home/trove/${trove_name} ]; then
|
if [ ! -d /home/trove/${trove_name} ]; then
|
||||||
|
if [[ ${repo_url} != 'ssh:'* ]]; then
|
||||||
git clone --mirror ${repo_url} /home/trove/${trove_name}
|
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
|
if [ ! -d /home/trove/${trove_name} ]; then
|
||||||
echo $"WARNING: failed to mirror repo ${repo_url}"
|
echo $"WARNING: failed to mirror repo ${repo_url}"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
cd /home/trove/${trove_name}
|
cd /home/trove/${trove_name}
|
||||||
|
git remote set-url origin ${repo_url}
|
||||||
|
if [[ ${repo_url} != 'ssh:'* ]]; then
|
||||||
git fetch -p origin
|
git fetch -p origin
|
||||||
|
else
|
||||||
|
sshpass -p "$FRIENDS_TROVE_PASSWORD" git fetch -p origin
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
chown -R trove:trove /home/trove
|
chown -R trove:trove /home/trove
|
||||||
|
|
Loading…
Reference in New Issue