When you are working on production you usually doesn’t have direct outgoing connection enabled or it could be really limited.

Here you can find a collection of configuration for different software for working via proxy. Let as assume that in all next examples we are talking about http proxy working on host

PROXY_HOST

and port

PROXY_PORT

githib.com behind proxy

Github could be accessed via various protocols

You can talk to github.com at 443 port as well see ssh over https port

~$ cat ~/.ssh/config

Host github.com
  Hostname ssh.github.com
  Port 443
  

General proxy solution could be build (and you can use it of other cases) with corkscrew utility.

~$ sudo apt-get install corkscrew

~$ cat git-proxy.sh
#!/bin/sh

exec corkscrew PROXY_HOST PROXY_PORT $*


~$ env | grep PROXY
GIT_PROXY_COMMAND=/home/illia_svyrydov/git-proxy.sh

corkscrew could be used for tunneling ssh connections in pretty handy way

~$ cat ~/.ssh/config
Host my_host
  Port 22
  ProxyCommand corkscrew PROXY_HOST PROXY_PORT %h %p

curl & wget

Just export system variables

$ env | grep proxy
http_proxy=http://PROXY_HOST:PROXY_PORT
https_proxy=http://PROXY_HOST:PROXY_PORT

gradle & gradlew

It follows standard java application proxy configuration, just to enable it isolated, it is better to use gradle specific env variable

$ env | grep proxy
GRADLE_OPTS=-Dhttps.proxyHost=PROXY_HOST -Dhttps.proxyPort=PROXY_PORT

npm

Source here

npm config set proxy http://PROXY_HOST:PROXY_PORT
npm config set https-proxy http://PROXY_HOST:PROXY_PORT