GitHub Setup for Windows in Corporate Environments

These steps are necessary to get Git working with GitHub from behind a corporate firewall. These steps are for a Microsoft Windows centric environment.

Installing the Windows Git Package

Download the windows installer from http://git-scm.com then run the installer with the recommended default settings. You’ll need sufficient privileges to install applications at your desktop (condolences if you don’t).

SS1  SS2 SS3 SS4

Configure Git Proxy Settings

Locate the .gitconfig file in your users home directory and open with a text editor. If you have roaming profiles, it can be challenging to find this as it may be mapped to a shared network drive.

You can locate the file by identifying the home directory with the SET command in the DOS Command Window. In this example it happens to be on a network share mapped to the V: drive.

Make a note of your system Proxy Server settings here.

SS5

Looking at my .config file, there are six data points needed to configure git to be able to pass through my Proxy Server.

You can do this configuration from the command line with git configure –global but it feels simpler to just edit it here with your text editor.

SS6

  1. Your NTLM or Windows domain followed by a back slash (\), which has to be escaped so two slashes (\\)
  2. Your Windows Domain Username followed by a colon (:)
  3. Your Windows Domain Password (remember to escape any special characters) followed by an at sympol (@)
  4. Your Proxy Server address or hostname followed by a colon (:)
  5. Your Proxy Server TCP port number
  6. This turns off SSL Certificate verification as this proxy substitutes signed certificates with its own self-signed version. Presumably in order to allow admins to inspect what you’re transmitting!

String it all together and you get something like

https://mywindomain\\cwhite:foofoobar@savageproxyserver:8081

Repeat these settings for the https directive below.

Setup a GitHub Repository

Go back to Github.com and create a new Repository. I’ve called mine Git_Setup.

SS7

Once it has bee created be sure to select the HTTP tab. If you fail to do this, instructions will assume you can perform outbound SSH from your host. Typical corporate Proxy and Firewall settings will deny this. So be sure to understand, you will be using Git over HTTPS through your Proxy Server.

You should then be able to perform the instructions identified in the red box from your Dos Command Window.

SS8

Seems to work for me…

SS9

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