-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1c0e3a6
commit 4218a45
Showing
4 changed files
with
9 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,19 +4,14 @@ set -x | |
|
||
function unset-git-caching-proxy { | ||
echo "Unsetting git caching proxy" | ||
git config --global --unset-all url.http://git-cdn-github.botmaster.tgr/.insteadOf || true | ||
# git config --global --unset-all url.http://git-cdn-gitlab.botmaster.tgr/.insteadOf || true | ||
rm -f ~/.git-credentials | ||
git config --global --list | grep 'url\.' | cut -d'=' -f1 | xargs -L1 git config --global --unset-all || true | ||
} | ||
|
||
function set-git-caching-proxy { | ||
trap unset-git-caching-proxy EXIT | ||
echo "Setting git caching proxy" | ||
git config --global --add url.http://git-cdn-github.botmaster.tgr/.insteadOf https://github.com/ | ||
git config --global --add url.http://git-cdn-github.botmaster.tgr/.insteadOf [email protected]: | ||
# git config --global --add url.http://git-cdn-gitlab.botmaster.tgr/.insteadOf https://gitlab.com/ | ||
git config --global credential.helper store | ||
echo "http://oauth2:$GITHUB_TOKEN@git-cdn-github.botmaster.tgr" > ~/.git-credentials | ||
git config --global --add url.http://oauth2:$GITHUB_TOKEN@git-cdn-github.botmaster.tgr/.insteadOf https://github.com/ | ||
git config --global --add url.http://oauth2:$GITHUB_TOKEN@git-cdn-github.botmaster.tgr/.insteadOf [email protected]: | ||
} | ||
|
||
if [ ! -z "$TI_USE_GIT_CACHE" ]; then | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters