From 728873c5a4e13e7f4b7fc60f1d8c61db18416886 Mon Sep 17 00:00:00 2001 From: Daniel Rudolf Date: Wed, 25 Nov 2015 22:26:51 +0100 Subject: [PATCH] build/deploy-phpdoc.sh: Fix credentials --- build/deploy-phpdoc.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/deploy-phpdoc.sh b/build/deploy-phpdoc.sh index bc3e2fb..39bc0ec 100755 --- a/build/deploy-phpdoc.sh +++ b/build/deploy-phpdoc.sh @@ -52,7 +52,11 @@ git clone --branch="$TARGET_BRANCH" "https://github.com/$GITHUB_SLUG.git" "$GIT_ cd "$GIT_DIR" git config user.name "Travis CI" git config user.email "travis-ci@picocms.org" -[ -n "$GITHUB_OAUTH_TOKEN" ] && git config credential.https://github.com.username "$GITHUB_OAUTH_TOKEN" + +if [ -n "$GITHUB_OAUTH_TOKEN" ]; then + git config credential.helper 'store --file=.git/credentials' + (umask 077 && echo "https://GitHub:$GITHUB_OAUTH_TOKEN@github.com" > .git/credentials) +fi # copy phpdoc printf '\nCopying phpDocs...\n'