Git connection with remote (push, pull) hang with ntlm proxy mapping (ntlmaps or cntlm)

StackOverflow https://stackoverflow.com/questions/20809196

  •  22-09-2022
  •  | 
  •  

سؤال

When behind a proxy that uses ntlm, and using ntlmaps and git proxy configuration, I can't get git to push.

Example .gitconfig

[user]
    name = Mr X
    email = immrx@mrx.com
[core]
    autocrlf = true
[http]
    proxy = http://localhost:5865

ntlmaps is set to answer on port 5865 of course.

I try to push, but I don't get an HTTP 407 after CONNECT, the push just hangs there, and I get no answer. Finally, I have to kill the push

هل كانت مفيدة؟

المحلول

Sometimes the DNS don't get resolved. You can try with localhost, or your own machine name (maybe with the domain). For example mrxmachine or mrxmachine.mrx.com. They will all fail, but you won't get an answer because, for some reason, git can't resolve the DNS. Being explicit about the ip for localhost will do.

Try

[user]
    name = Mr X
    email = immrx@mrx.com
[core]
    autocrlf = true
[http]
    proxy = http://127.0.0.1:5865

or use your own ip (you can check it in a cmd window with ipconfig)

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top