It seems that cntlm tries to set a cookie when you do "git push". Look into 
git's output with "GIT_CURL_VERBOSE=1" for something like:
Set-Cookie: BCSI-CS-d9d6d71c4478035c=1; Path=/

Current versions of git (<1.8.5) don't store this cookie and don't use it 
for subsequent calls. Therefore, the authentication with github never 
passes.

Currently git only supports using a cookie file that already exists:
$ git config --global http.cookiefile /tmp/cookies
However, nobody will create this file (see 
https://www.kernel.org/pub/software/scm/git/docs/git-config.html).

Fortunately, latest RC (1.8.5.rc0) adds support for storing cookies. 
Additionally you'll have to add to your config:
$ git config --global http.savecookies true
You can get this release from here: 
http://fossies.org/linux/misc/git-1.8.5.rc0.tar.gz/index_st.html
Note that on Ubuntu you also need to apt-get install libcurl4-openssl-dev 
before compiling it.

If you cannot update to this version of git, you can probably create the 
file manually. It should contain something like:
github.com      FALSE   /       FALSE   0       BCSI-CS-d9d6d71c4478035c   
     1
However, note that the name of this cookie changes each time cntlm is 
restarted.

Cheers,
Catalin.


On Thursday, August 2, 2012 7:17:38 PM UTC+2, Konstantin Khomoutov wrote:
>
> On Thu, 2 Aug 2012 02:03:34 -0700 (PDT) 
> MohanR <radhakris...@gmail.com <javascript:>> wrote: 
>
> > Looks like this is the problem. But I got this error through Github 
> > for Windows which is configured to use cntlm. Clone is fine. 
> > 
> > Sending PROXY auth request... 
> > Host                           => github.com:443 
> > User-Agent                     => git/1.7.11.msysgit.1 
> > Proxy-Connection               => keep-alive 
> > Content-Type                   => 
> > application/x-git-receive-pack-request Accept 
> > => application/x-git-receive-pack-result 
> > Proxy-Authorization            => NTLM 
> > TlRMTVNTUAABAAAABbIIogMAAwAsAAAADAAMACAAAABGU1NDSE5EMTE2MDdGU1M= 
> > Content-Length                 => 0 
> > 
> > Reading PROXY auth response... 
> > HEAD: HTTP/1.1 407 Proxy Authentication Required ( Access is 
> > denied.  ) 
>
> What if you try to access http://github.com:443 from your web-browser 
> (which is supposed to be able to authenticate OK)? 
>
> The problem is that it seems like the authentication phase does happen, 
> and your request thus might be denied by the access policy of your 
> corporate HTTP proxy. 
>
> Even if you will access the URL OK in your browser, the proxy can deny 
> your request based on the request's content type, for instance. 
> It's hard to guess, so I'd ask the system administrators. 
>

-- 
You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to