MINGW Windows - 卷曲7.59.0缺少sftp lib

时间:2018-05-15 08:05:50

标签: curl msysgit

我已安装新版本的msysgit和MINGW,但是不支持sftp?!你能帮我加一下吗?

$ curl -V
curl 7.59.0 (x86_64-w64-mingw32) libcurl/7.59.0 OpenSSL/1.0.2o (WinSSL) 
zlib/1.2.11 libidn2/2.0.4 nghttp2/1.31.0
Release-Date: 2018-03-14
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 
pop3s rtsp smtp smtps telnet tftp
Features: AsynchDNS Debug IDN IPv6 Largefile SSPI Kerberos SPNEGO NTLM SSL 
libz TLS-SRP HTTP2 HTTPS-proxy MultiSSL Metalink

当我尝试访问sftp时: fatal: Protocol 'sftp' not supported by curl, exiting...

1 个答案:

答案 0 :(得分:0)

我找到了解决方案。我只是download some other curl.exe文件并将其替换为

javax.net.ssl.HttpsURLConnection.setDefaultHostnameVerifier(new HostnameVerifier() { override def verify(hostname: String, sslSession: SSLSession): Boolean = { // hostname == "127.0.0.1" true } })

SFTP工作,但是又出现了另一个错误。

C:\Program Files\Git\mingw64\bin

所以我用-v选项运行: fatal: Could not get last commit. Network down? Wrong URL? Use 'git ftp init' for the initial push., exiting...

错误是: git ftp push -v

最后我跑了curl: (51) SSL peer certificate or SSH remote key was not OK from here

但它并没有帮助我,所以我只使用参数ssh-keyscan hostname.example.com >> ~/.ssh/known_hosts,现在效果很好。