4

I've tried everything, but still can't seem to be able to clone a git repository over https, even though I have no problem getting an https page.

cURL version:

$ curl --version 
curl 7.21.7 (amd64-pc-win32) libcurl/7.21.7 OpenSSL/0.9.8r zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp
smtp smtps telnet tftp
Features: AsynchDNS GSS-Negotiate Largefile NTLM SSL SSPI libz 

Trying to clone https repo:

$git clone https://github.com/SublimeText/LaTeXTools.git
Cloning into 'LaTeXTools'...
error: Protocol https not supported or disabled in libcurl while accessing https
://github.com/SublimeText/LaTeXTools.git/info/refs?service=git-upload-pack
fatal: HTTP request failed

Works for https pages no problem:

$ curl -L https://www.google.com
<!doctype html><html 
...
</script></body></html>

Any suggestions? Thanks!

nunos
  • 20,479
  • 50
  • 119
  • 154

3 Answers3

2

It's possible that git is using a different libcurl.dll than your command-line curl. Make sure that you don't have any other libcurl.dll builds on your %PATH% from other things that you've installed, just the one that was bundled with git.

Ash Wilson
  • 22,820
  • 3
  • 34
  • 45
2

It could be a conflict between two different curl versions (one installed on the system by default, one actually used due to your path)

You can see one example in this thread:

for some reason, there was a curl installed in /usr/local/bin, and my $PATH starts out "/usr/local/bin:/usr/bin: ... ".
What I did is I removed /usr/local/bin/curl, then made a symlink to /usr/bin/curl at /usr/local/bin/curl (ln -s /usr/bin/curl /usr/bin/local/curl), then I removed all of the curl libraries in /usr/local/lib.

You can see the same kind of issue (on a Mac this time) in "How do I enable https support in libcurl?".

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

I guess the reason was a conflict between libcurl.dlls yes. In case, someone stumbles upon this from google or similar, the solution for me was as simple as uninstalling and installing again Git. That did the trick.

Thanks for the other answers, though. Cheers.

nunos
  • 20,479
  • 50
  • 119
  • 154