macos - 在 OSX 上对 curl 的 SFTP 支持

标签 macos curl ssh sftp homebrew

我正在尝试在 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/

相关文章:

bash - 获取 curl http 代码

macOS SO_REUSEPORT 的setsockopt()

xcode - 重置Xcode 4窗口位置

swift - 从沙盒应用程序启动的应用程序不是沙盒

python - 使用 Flask-Kerberos 时无法通过 curl 访问应用程序

azure - 无法连接到使用 Azure Powershell 创建的 Azure 虚拟机

cocoa - WebView mainFrame 方法返回 nil

python - 移动友好测试脚本

git - 是否可以在不打开浏览器的情况下从 CLI 在 GitHub 上创建远程仓库?

java - 在 Android Studio 中使用 JSch 连接到 SSH 时应用程序被强制关闭