使用git pull / push通过sftp-only连接

时间:2013-08-05 17:06:00

标签: git curl sftp ftps

我需要在两个主机之间同步git存储库,这两个主机只能通过专用的sftp服务器相互通信。

据我所知,git附带一个ftps但没有sftp助手。

根据man gitremote-helpers

   Git comes with a "curl" family of remote helpers, that handle various transport
   protocols, such as git-remote-http, git-remote-https, git-remote-ftp and
   git-remote-ftps. They implement the capabilities fetch, option, and push.

根据man curl curl支持ftps和sftp:

   curl is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS,
   LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMTP, SMTPS, TELNET and TFTP).  The command is designed to work without user interaction.

由于curl理解这两个协议,并且两者都应该提供几乎相同的功能,有没有什么好的理由为什么有一个ftps帮助器而没有sftp帮助?

我目前正在考虑实施与git-remote-sftp类似的自己的git-remote-testgit。我错过了更好的方式吗?

0 个答案:

没有答案