My git setup including GitHub and proxy

Goal 1:

Remember password (for 8 hours)  so I do not need to reenter it every time for https connection to Github from cygwin. Remember my username for GitHub.

Solution – append cygwin ~/.gitconfig with:

[url "https://bmwieczorek@github.com"]
 insteadOf = https://github.com
[credential]
 helper = cache --timeout=28800

Goal 2:

While being AT WORK or VIA WOKR  VPN:
1) use proxy for (outside) non company git repo (e.g. github) and
2) do not use proxy for company internal git repo

WINDOWS SETUP:
set in windows: computer (right click) / advanced system settings / envoronment variables / set variable for user:

http_proxy ---> http://user:pass@proxy.mycompany.com:port
https_proxy ---> http://user:pass@proxy.mycompany.com:port
no_proxy ---> .mycompany.com,localhost

or use a setenv.bat script:

setx http_proxy "http://user:pass@proxy.mycompany.com:port"
setx https_proxy "http://user:pass@proxy.mycompany.com:port"
setx no_proxy ".sabre.com,localhost"

cygwin settings in ~/.bashrc or ~/.bash_profile:

export http_proxy=http://user:pass@proxy.mycompany.com:port
export https_proxy=http://user:pass@proxy.mycompany.com:port
export no_proxy=.mycompany.com

INTELIJ:
File/settings/Apperance and Behaviour/System settings/HTTP proxy: check autodetect proxy settings

ECLIPSE:
set proxy settings to eclipse: window/preferences/general/network connections/active provider: native

Tortoise GIT:
Network: proxy NOT enabled

~/.gitconfig
http and https proxy commented as not used

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s