From 4e8f0169bd9705cf6b0c88d6a69d87fece5fa7c8 Mon Sep 17 00:00:00 2001 From: buildmaster Date: Thu, 13 Dec 2018 17:42:05 +0000 Subject: [PATCH] Sync docs from master to gh-pages --- ghpages.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ghpages.sh b/ghpages.sh index 9ee39156..927084d1 100644 --- a/ghpages.sh +++ b/ghpages.sh @@ -34,10 +34,10 @@ function set_default_props() { # Adds the oauth token if present to the remote url function add_oauth_token_to_remote_url() { - if [[ "${RELEASER_GIT_OAUTH_TOKEN}" != "" ]]; then + remote=`git config remote.origin.url | sed -e 's/^git:/https:/'` + echo "Current remote [${remote}]" + if [[ "${RELEASER_GIT_OAUTH_TOKEN}" != "" && ${remote} != *"@"* ]]; then echo "OAuth token found. Will reuse it to push the code" - remote=`git config remote.origin.url | sed -e 's/^git:/https:/'` - echo "Current remote [${remote}]" withToken=${remote/https:\/\//https://${RELEASER_GIT_OAUTH_TOKEN}@} git remote set-url --push origin "${withToken}" else