Using git command with proxy network settings

03 Feb

Using git bash when a proxy is required is not as easy as is expected, below is the procedures to setup this:

1. in the command prompt, type:

git config –global http.proxy

where the uer and password strings are self-explantory

2. after setting the proxy, you can see if this configuration really takes effect by typing in the command:

git config –get –global http.proxy

3. Once this is done, you might try:

git pull origin master

however it won’t work!

4. Replace the origin with the github URL:

git pull master

it will work now!  Note that you might be prompted to input GitHub user name and password as well.



Posted by on February 3, 2012 in General


8 responses to “Using git command with proxy network settings

  1. xinyustudio

    February 6, 2012 at 9:54 am

    use git config –global http.proxy --unset or git config –global http.proxy --remove to remove the proxy setting.

  2. sushil22saini

    October 15, 2012 at 7:13 am

    Thanks Man this post really helped me …


    July 31, 2013 at 2:32 pm

    here is my result

    ~$ git pull origin master
    fatal: Not a git repository (or any of the parent directories): .git

    can you please help me

  4. xinyustudio

    July 31, 2013 at 2:49 pm

    you are not on the working folder. check the folder before you pull, and make sure there is a sub-folder called “.git”, then go to its parent folder by “cd ..”, and then re-pull, it should be fine.


    July 31, 2013 at 6:34 pm

    can you please elaborate..
    I was new to git….
    I have a folder called git but not .git in home/saikirangvr

    what to do know

  6. xinyustudio

    July 31, 2013 at 6:41 pm

    Git flow is not for those who are new to git, pardon me for my frankness. my above comments are already very detailed, if you still cannot figure out how to act, I suggest you to do a basic search on git, not on git flow. your problem is unrelated to Git-flow. Thanks.

  7. Jason

    September 3, 2013 at 10:56 am

    Hi mate, this works well for pull but for some reason push gets a 407 error – any idea why this may be?

  8. xinyustudio

    September 3, 2013 at 11:02 am


Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: