Skip to content

Commit 2a637ea

Browse files
remove sudo from git commands
1 parent a5ef8ce commit 2a637ea

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

travis-ci/changefile.sh

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,32 @@ MONTH=$(date +"%m")
44
cd $TRAVIS_BUILD_DIR
55
#sudo whoami
66
#sudo chown root:root -R $TRAVIS_BUILD_DIR
7-
sudo git remote -v
7+
git remote -v
88
echo "First check of remote"
9-
sudo git remote rm origin
9+
git remote rm origin
1010
echo "Try removing remote"
11-
sudo git remote -v
11+
git remote -v
1212
echo "Second check of remote"
13-
sudo git remote add origin https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
14-
sudo git remote -v
13+
git remote add origin https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
14+
git remote -v
1515
echo "Third Check of Remote After Adding it"
1616
ls -l $TRAVIS_BUILD_DIR/.git/FETCH_HEAD
1717
ls -la $TRAVIS_BUILD_DIR
1818
ls -la $TRAVIS_BUILD_DIR/.git
19-
sudo git fetch origin master
19+
git fetch origin master
2020
ls -la $TRAVIS_BUILD_DIR/.git
2121
echo "Check permissions on git HEAD / get dir listing of travis build dir"
22-
sudo git config --global user.email "${GIT_EMAIL}"
23-
sudo git config --global user.name "${GIT_NAME}"
24-
sudo git config --global push.default simple
22+
git config --global user.email "${GIT_EMAIL}"
23+
git config --global user.name "${GIT_NAME}"
24+
git config --global push.default simple
2525
export GIT_TAG=V2.$YEAR-$MONTH.$TRAVIS_BUILD_NUMBER
2626
msg="Tag Generated from TravisCI for build $TRAVIS_BUILD_NUMBER"
2727
#echo "$msg" >> $TRAVIS_BUILD_DIR/build.txt
2828
sudo $TRAVIS_BUILD_DIR/travis-ci/modify-globalblacklist.sh
2929
#sudo git add $TRAVIS_BUILD_DIR/globalblacklist.conf
30-
sudo git add -A .
30+
git add -A .
3131
#git add $TRAVIS_BUILD_DIR/build.txt
32-
sudo git commit -m "Update build version file with $TRAVIS_BUILD_NUMBER"
32+
git commit -m "Update build version file with $TRAVIS_BUILD_NUMBER"
3333

3434
#YEAR=$(date +"%Y")
3535
#MONTH=$(date +"%m")

travis-ci/deploy2.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,16 @@
22
YEAR=$(date +"%Y")
33
MONTH=$(date +"%m")
44
cd $TRAVIS_BUILD_DIR
5-
sudo git config --global user.email "${GIT_EMAIL}"
6-
sudo git config --global user.name "${GIT_NAME}"
7-
sudo git config --global push.default simple
5+
git config --global user.email "${GIT_EMAIL}"
6+
git config --global user.name "${GIT_NAME}"
7+
git config --global push.default simple
88
#sudo git remote add origin https://${GH_TOKEN}@github.com/${TRAVIS_REPO_SLUG}.git
99
export GIT_TAG=V2.$YEAR-$MONTH.$TRAVIS_BUILD_NUMBER
10-
sudo git fetch --tags
10+
git fetch --tags
1111
msg="Tag Generated from TravisCI for build $TRAVIS_BUILD_NUMBER"
12-
if sudo git tag $GIT_TAG -a -m "$msg" 2>/dev/null; then
13-
sudo git tag $GIT_TAG -a -m "Tag Generated from TravisCI for build $TRAVIS_BUILD_NUMBER"
14-
sudo git push origin master && sudo git push origin master --tags
12+
if git tag $GIT_TAG -a -m "$msg" 2>/dev/null; then
13+
git tag $GIT_TAG -a -m "Tag Generated from TravisCI for build $TRAVIS_BUILD_NUMBER"
14+
git push origin master && git push origin master --tags
1515
ls -aR
1616
else echo Tag already exists!; fi
1717

0 commit comments

Comments
 (0)