Empty server response with cntlm proxy and basic auth params in url for yum repo

651 Views Asked by At

I am using cntlm proxy on a CentOs 7 server behind a corporate proxy which needs an authentication.

Here is my cntlm.conf file :

Username    user
Domain      dom
Auth        NTLMv2
PassNTLMv2  **********

Proxy       corporateproxy:8080
NoProxy     localhost, 127.0.0.*, 10.*, 192.168.*, 172.*, *.local

Listen      0.0.0.0:3128

Everything works ok, except for a yum repo who needs a basic auth :

[datastax-cassandra]
name=datastax-cassandra
humanname=DataStax Repo for DataStax Enterprise
baseurl= http://[email protected]:[email protected]/entreprise
gpgcheck=0
enabled=1

When running

repoquery --plugins --queryformat '%{NAME}_|-%{VERSION}_|-%{RELEASE}_|-%{ARCH}_|-%{REPOID}'   --pkgnarrow=available selinux-policy-devel policycoreutils-python

I get :

Could not match packages: failure: repodata/repomd.xml from datastax-cassandra: [Errno 256] No more mirrors to try.
http://[email protected]:[email protected]/enterprise/repodata/repomd.xml: [Errno 14] curl#52 - "Empty reply from server"

For any other mirror server which do not need basic auth, everything is ok.

Any idea (cntlm configuration, yum repo configuration, ...) ?

1

There are 1 best solutions below

1
On

There is a patch for cntlm with support for Basic HTTP Auth; see cntlm-0.35.1 modified to support Basic HTTP Auth with HTTPAUTH parameter