fix(plugins): add touch netrc and remove netrc in git auth fn

This commit is contained in:
arturs
2021-04-14 21:41:33 +03:00
parent be01d2f7ec
commit 84daf1ae52

View File

@@ -112,10 +112,12 @@ cmd-git-auth() {
if [[ -z "$USERNAME" ]]; then
dokku_log_info1 "Removing netrc auth entry for host $HOST"
netrc unset "$HOST"
rm "${DOKKU_ROOT}/.netrc"
return $?
fi
dokku_log_info1 "Setting netrc auth entry for host $HOST"
touch "${DOKKU_ROOT}/.netrc"
netrc set "$HOST" "$USERNAME" "$PASSWORD"
}