From 03834b5980a22ef9678f7d8548a9920aaaf34e01 Mon Sep 17 00:00:00 2001 From: "Philipp A. Hartmann" Date: Sun, 13 Jul 2014 11:48:37 +0200 Subject: travis-doxygen.sh: directly setup .git-credentials Instead of fiddling with the non-working GIT_ASKPASS/core.askpass setup, simply store the required Git credentials directly in ~/.git-credentials, which is used by Git's "store" credential helper. Works on https://travis-ci.org/pah/rapidjson. --- build/travis-doxygen.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'build') diff --git a/build/travis-doxygen.sh b/build/travis-doxygen.sh index 214ba218..239afb38 100755 --- a/build/travis-doxygen.sh +++ b/build/travis-doxygen.sh @@ -11,12 +11,12 @@ DOXYGEN_URL="http://ftp.stack.nl/pub/users/dimitri/${DOXYGEN_TAR}" DOXYGEN_BIN="/usr/local/bin/doxygen" : ${GITHUB_REPO:="miloyip/rapidjson"} -GITHUB_CLONE="git://github.com" -GITHUB_PUSH="https://ssl.sorgh.de/authdump.php" -GITHUB_URL="${GITHUB_PUSH}/${GITHUB_REPO}" +GITHUB_HOST="github.com" +GITHUB_CLONE="git://${GITHUB_HOST}/${GITHUB_REPO}" +GITHUB_URL="https://${GITHUB_HOST}/${GITHUB_PUSH-${GITHUB_REPO}}" # if not set, ignore password -: ${GIT_ASKPASS:="${TRAVIS_BUILD_DIR}/gh_ignore_askpass.sh"} +#GIT_ASKPASS="${TRAVIS_BUILD_DIR}/gh_ignore_askpass.sh" skip() { echo "$@" 1>&2 @@ -67,7 +67,7 @@ gh_pages_prepare() [ ! -d "html" ] || \ abort "Doxygen target directory already exists." git --version - git clone --single-branch -b gh-pages "${GITHUB_CLONE}/${GITHUB_REPO}" html + git clone --single-branch -b gh-pages "${GITHUB_CLONE}" html cd html # setup git config (with defaults) git config user.name "${GIT_NAME-travis}" @@ -105,11 +105,11 @@ gh_pages_push() { cd "${TRAVIS_BUILD_DIR}/doc/html"; # setup credentials (hide in "set -x" mode) git remote set-url --push origin "${GITHUB_URL}" - [ -x "${GIT_ASKPASS}" ] || gh_setup_askpass - echo ${GIT_ASKPASS} - export GIT_ASKPASS git config credential.helper 'store' - ( set +x ; git config credential.username "${GH_TOKEN}" ) + # ( set +x ; git config credential.username "${GH_TOKEN}" ) + ( set +x ; \ + echo "https://${GH_TOKEN}:@${GITHUB_HOST}" > ${HOME}/.git-credentials ; \ + chmod go-rw ${HOME}/.git-credentials ) # push to GitHub git push origin gh-pages || \ skip "GitHub pages update failed, temporarily ignored." -- cgit v1.2.3