Skip to content

Commit

Permalink
Test new way of adding secure remote with GH_TOKEN
Browse files Browse the repository at this point in the history
  • Loading branch information
mitchellkrogza committed Jun 24, 2017
1 parent 3f20e91 commit 2c2107d
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions travis-ci/change-file.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@ MONTH=$(date +"%m")
cd $TRAVIS_BUILD_DIR

#Remove Remotes Added by TravisCI
git remote rm origin
#git remote rm origin

#Add Remote with Secure Key
git remote add origin https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
#git remote add origin https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git

local remote=origin
if [[ $GH_TOKEN ]]; then
remote=https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG
fi

#List Remotes ONLY DURING testing - do not do this on live repo / possible key leak
#git remote -v
Expand Down

0 comments on commit 2c2107d

Please sign in to comment.