Showing posts with label Proxy. Show all posts
Showing posts with label Proxy. Show all posts

Friday, August 8, 2014

Beyond The Wall (Proxy)

North of the Wall, things are different. That's where the children went, and the giants, and the other old races.
Nowadays a lot of development resources are managed via a package manager. While this makes life a lot easier almost all of the time, it can be a little bit of a headache if you aren't set up like everyone else is. When I first started out at Motorola, I had a rough time getting some of these to work. I finally realized that it had to do with me being behind the company proxy.  So here is what you need to do to get a couple things to work if you are behind a company proxy so hopefully someone else doesn't have to go through what I did.

1. Bower
Open up your bower config file (.bowerrc) and add the following lines:

  "proxy":"http(s)://server:port/",
  "https-proxy":"http(s)://server:port/"

2. Git 

Open up your .gitconfig file and add the following lines:

[http]
    proxy = http(s)://server:port/
[https]
    proxy = http(s)://server:port/

3. NPM

I believe these get stored in the .npmrc file, but npm recommends you set them via command line with these commands.

npm config set proxy http(s)://server:port npm config set https-proxy http(s)://server:port

Your .npmrc file then looks like this:

proxy =http(s)://server:port
https_proxy = http(s)://server:port


*The image above is copyrighted by HBO