Cloning a Git repository over SFTP

Deadly 提交于 2019-12-22 04:27:08

问题


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.



来源:https://stackoverflow.com/questions/9163295/cloning-a-git-repository-over-sftp

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!