-
-
Save vtml/caf61edd69cba0c82206126cb01d0dd3 to your computer and use it in GitHub Desktop.
Git and Node with Zscaler proxy
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
#!/bin/sh | |
# Git proxy settings | |
echo "Configuring Git..." | |
git config --global http.proxy http://gateway.zscaler.net:80/ | |
git config --system http.proxy http://gateway.zscaler.net:80/ | |
git config --global http.sslVerify false | |
git config --system http.sslVerify false | |
git config --global --unset http.sslcainfo | |
git config --system --unset http.sslcainfo |
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
#!/bin/sh | |
echo "Be sure to install NodeJS from http://nodejs.org before continuing" | |
read -p "Press enter to continue" | |
# NPM proxy settings | |
echo "Configuring NodeJS..." | |
mkdir /c/Users/$USERNAME/npm/ | |
touch /c/Users/$USERNAME/npm/.npmrc | |
echo "proxy=http://gateway.zscaler.net:80/" >> /c/Users/$USERNAME/npm/.npmrc | |
echo "strict-ssl=false" >> /c/Users/$USERNAME/npm/.npmrc | |
# Tell NPM to use a local directory for installations and caching because user profile folders that are mapped to network shares cause many problems | |
mkdir /c/apps | |
mkdir /c/apps/npm | |
mkdir /c/Program\ Files/nodejs/node_modules/npm/ | |
touch /c/Program\ Files/nodejs/node_modules/npm/.npmrc | |
cp /c/Program\ Files/nodejs/node_modules/npm/.npmrc /c/Program\ Files/nodejs/node_modules/npm/.npmrc.backup | |
echo "prefix=C:\apps\npm" > /c/Program\ Files/nodejs/node_modules/npm/.npmrc | |
# Node modules | |
echo "Installing Grunt..." | |
npm install -g grunt-cli |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment