2012-11-01 60 views
5

我想在OSX中获得对卷曲的SFTP支持。我通过SFTP支持在OSX上卷曲

$ brew install curl --with-ssh 

安装卷曲,我也通过

$ sudo ln -s /usr/local/bin/curl /usr/bin/curl 

符号链接的自制软件版本到/ usr/bin中,但使用

当我仍然得到一个

curl: (1) Protocol sftp not supported or disabled in libcurl 

$ curl sftp://some.host.com/path/to/file 

我的努力是connec解决这个问题的真棒git-ftp https://github.com/resmo/git-ftp/issues/146

我在做什么错?

+3

只是一个简短的说明:似乎现在你需要: 酿造安装卷曲--with-libssh2 – DerWOK

+1

@DerWOK找你真正的MVP在这里,这比答案更好。 – njfife

回答

4

运行'curl -V'并查看SFTP是否被列为支持的协议。

如果不是,curl需要用libssh2重建才能获得内置的支持。

+3

嗨,谢谢。虽然我用ssh安装了curl,但确实没有列出sftp。原来,自制软件将卷曲安装到了'/ usr/local/Cellar/curl/7.28.0/bin/curl'中,因此符号链接的重做对我有用:'ln -s /usr/local/Cellar/curl/7.28 .0/bin/curl/usr/bin/curl' – owzim

+0

由于同样的错误而使用git-ftp。 Small world ... FYI,Homebrew在创建curl之后说:这个公式仅仅是桶,所以它没有符号链接到/ usr/local。 Mac OS X已经提供了此软件,并行安装另一个版本可能会导致各种麻烦。 – dbenton