Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
593 views
in Technique[技术] by (71.8m points)

version control - How to point Git to use cntlm

I am working behind a proxy and I can't access github.com. I read that cntlm can fix this issue. I am still struggling with filling the proxy information.

So my question is, how to point Git to use cntlm to bypass the proxy?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

In case you actually would want to use CNTLM, it would be configured to git like a regular proxy.

So where you would specify your NTLM proxy like this:

git config --global https.proxy https://user:password@proxy.com:port
git config --global http.proxy http://user:password@proxy.com:port

For CNTLM, you'd just specify your port where CNTLM would be listening at, using localhost:

git config --global https.proxy https://127.0.0.1:port
git config --global http.proxy http://127.0.0.1:port

I have it running on local port 3128, so for me it is

git config --global https.proxy https://127.0.0.1:3128
git config --global http.proxy http://127.0.0.1:3128

Even if NTLM proxy is supported by git, you might not want to use it that way as it stores your user/pass in clear text. With CNTLM, you have the possibility of using a centralized location where password can be stored as encrypted.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...