-
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
Showing
1 changed file
with
5 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,16 +5,18 @@ 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 | ||
# git config --global --unset-all url.http://git-cdn-gitlab.botmaster.tgr/.insteadOf || true | ||
rm -f ~/.git-credentials | ||
} | ||
|
||
function set-git-caching-proxy { | ||
return # Disable git caching proxy, modified git-cdn image is lost | ||
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 --add url.http://git-cdn-gitlab.botmaster.tgr/.insteadOf https://gitlab.com/ | ||
git config --global credentials.helper store | ||
echo "http://oauth2:$GITHUB_TOKEN@git-cdn-github.botmaster.tgr" > ~/.git-credentials | ||
} | ||
|
||
if [ ! -z "$TI_USE_GIT_CACHE" ]; then | ||
|