Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

curl sspi ntlm #555

Closed
educhana opened this issue Dec 2, 2015 · 5 comments
Closed

curl sspi ntlm #555

educhana opened this issue Dec 2, 2015 · 5 comments

Comments

@educhana
Copy link

educhana commented Dec 2, 2015

There are two curl binaries in git-for-windows located into:

usr/bin/curl.exe
nimgw64/bin/curl.exe

But compiled with different features. The one in usr/bin misses the SSPI feature, which means that can not use proxy NTLM auth using the windows login credentials.

Details:

usr/bin/curl.exe -V
curl 7.45.0 (x86_64-pc-msys) libcurl/7.45.0 OpenSSL/1.0.2d zlib/1.2.8 libidn/1.32
libssh2/1.6.0
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp s
ftp smb smbs smtp smtps telnet tftp
Features: Debug IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets Met
alink

nimgw64/bin/curl.exe -V
curl 7.45.0 (x86_64-w64-mingw32) libcurl/7.45.0 OpenSSL/1.0.2d zlib/1.2.8 libidn/1.32
libssh2/1.6.0 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s
rtmp rtsp scp sftp smtp smtps telnet tftp
Features: IDN IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL libz TLS-SRP

Git works OK with NTLM+SSPI auth. But Git Bash puts first in the path the usr/bin version,

@dscho
Copy link
Member

dscho commented Dec 2, 2015

Git Bash puts first in the path the usr/bin version,

This is not correct; Starting Git Bash from the Start Menu results in this PATH:

me@work MINGW64 ~
$ echo $PATH
/c/Users/me/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:[...]

As you can clearly see, /mingw64/bin is in the PATH before /usr/bin.

But maybe you started Git Bash differently and wanted to describe what you tried, precisely?

@ismail
Copy link

ismail commented Dec 2, 2015

PATH problem aside it doesn't make sense to ship two curl binaries.

@dscho
Copy link
Member

dscho commented Dec 2, 2015

@ismail patches welcome.

@educhana
Copy link
Author

educhana commented Dec 2, 2015

You are rigth. Starting with git-bash.exe puts /migw64 first.

My fault. I was starting this using cmder which packages git-for-windows inside, and puts /usr/bin path first. My fault.

Just out of curiosity, what is the reason of shipping two binaries? Is it an error or is needed for something?

@dscho
Copy link
Member

dscho commented Dec 2, 2015

Just out of curiosity, what is the reason of shipping two binaries? Is it an error or is needed for something?

(For background regarding MSys2 vs MinGW, the short version is that for some functionality, we rely on the POSIX emulation layer provided by MSys2, a slimmed down Cygwin. Whenever we can get away without using POSIX functionality, we try to rely on MinGW instead, which targets the Win32 API directly.)

The curl package (which is the MSys2 package) is required by Perl. Perl needs MSys2 because it requires the fork() call. And we need Perl because git-svn is implemented as a Perl script that relies on Subversion bindings (and Subversion bindings is another thing that is really hard to do without POSIX functionality).

The mingw-w64-curl package (which is the MinGW package) is required by the HTTP(S) support of git.exe itself.

These packages both include also the executables curl.exe you found. Therefore, it is actually more work to ship with only one curl.exe because we have to filter out one of them.

Feel free to patch our exclusion filter, make sure to test that your patch works by making and running an installer and then open a Pull Request.

If I did not have a couple of really pressing other things to do, I would make that change myself, but as it is, I have to rely on your participation.

@dscho dscho closed this as completed Apr 4, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants