Skip to content

Commit 2c2107d

Browse files
Test new way of adding secure remote with GH_TOKEN
1 parent 3f20e91 commit 2c2107d

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

travis-ci/change-file.sh

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,15 @@ MONTH=$(date +"%m")
44
cd $TRAVIS_BUILD_DIR
55

66
#Remove Remotes Added by TravisCI
7-
git remote rm origin
7+
#git remote rm origin
88

99
#Add Remote with Secure Key
10-
git remote add origin https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
10+
#git remote add origin https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
11+
12+
local remote=origin
13+
if [[ $GH_TOKEN ]]; then
14+
remote=https://$GH_TOKEN@github.com/$TRAVIS_REPO_SLUG
15+
fi
1116

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

0 commit comments

Comments
 (0)