git_pull: delete key file first so we are not always appending (#1218)

This commit is contained in:
Allan Clark
2020-05-05 05:06:58 -07:00
committed by GitHub
parent 1b29439008
commit 9e08ede0f9
3 changed files with 6 additions and 1 deletions

View File

@@ -30,6 +30,7 @@ function add-ssh-key {
) > ~/.ssh/config
echo "[Info] Setup deployment_key on id_${DEPLOYMENT_KEY_PROTOCOL}"
rm -f "${HOME}/.ssh/id_${DEPLOYMENT_KEY_PROTOCOL}"
while read -r line; do
echo "$line" >> "${HOME}/.ssh/id_${DEPLOYMENT_KEY_PROTOCOL}"
done <<< "$DEPLOYMENT_KEY"