Cloning a Git repository over SFTP

2019-04-24 14:41发布

问题:

I get a fatal error every time I try to clone my Git repository:

I run this:

$ git clone sftp://foo@bar.ca/git/foobar.git

and I get this:

fatal: Unable to find remote helper for 'sftp'

I'm trying to clone from one server to another, both of which use SSH authentication.

Is there something I need to install to enable this SFTP remote helper?

Thanks in advance for any advice you can offer!

回答1:

To make jdi's comment from above more explicit: There is no sftp remote helper in Git. Available remote helpers include git-remote-ftps, but ftps (FTP over SSL) and sftp (SSH File Transfer Protocol) are fundamentally different protocols. That said, using ftps to clone a Git repository is rather uncommon, you probably want to use ssh instead.



标签: git ssh sftp