Git error: fatal: unable to connect a socket (Invalid argument)

前端 未结 7 1097
情话喂你
情话喂你 2020-12-07 13:11

I\'ve got msysGit (Git on Windows) working just fine on my home machine, but at work, where we are behind a Microsoft ISA proxy, I get the following error when I do a git cl

7条回答
  •  既然无缘
    2020-12-07 13:57

    I had the exact same error; but the ~/.gitconfig global config file was the key.

    If you have a proxy with authentication you need to put in it:

    git config --global http.proxy http://login:password@our-proxy-server:8088
    

    And it just works (with 'git clone http:')

    Example of a blog detailing the same setup: GIT clone over HTTP: who knew?


    If it still fails in 407, it could be related to a problem with git-fetch losing authentication tokens on the second HTTP GET. A more recent version of libcurl might be needed.


    Update January 2011: jbustamovej mentions in his answer (upvoted) his blog post "GitHub Behind Corporate Proxy", which adds this:

    It’s important to note that if your login has a backslash, as in domain\login, you must escape the backslash, as in:

    git config --global http.proxy http://domain\\\login:password@our-proxy-server:8088
    

提交回复
热议问题