我正在尝试在 OSX 中获得对 curl 的 SFTP 支持。我通过安装 curl
$ brew install curl --with-ssh
我还通过将 Homebrew 版本符号链接(symbolic link)到/usr/bin
$ sudo ln -s /usr/local/bin/curl /usr/bin/curl
但我仍然得到一个
curl: (1) Protocol sftp not supported or disabled in libcurl
使用时
$ curl sftp://some.host.com/path/to/file
我的努力与真棒 git-ftp https://github.com/resmo/git-ftp/issues/146 的问题有关。
我究竟做错了什么?
最佳答案
运行“curl -V”并查看 SFTP 是否被列为支持的协议(protocol)。
如果不是,则需要使用 libssh2 重新构建 curl 以获得内置支持。
关于macos - 在 OSX 上对 curl 的 SFTP 支持,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13171550/