Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cloning a Git repository over SFTP

Tags:

git

ssh

sftp

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

I run this:

$ git clone sftp://[email protected]/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!

like image 244
J K Avatar asked Feb 06 '12 16:02

J K


People also ask

Does git use SFTP?

Git does not use FTP or SFTP (which are two totally different things).

How do I clone a remote git repository to local?

To Git clone a repository navigate to your preferred repository hosting service like GitHub, select the repository you want to clone, copy the repository URL via HTTPS or SSH, type git clone in the command line, paste the URL, and hit enter .


1 Answers

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.

like image 65
sschuberth Avatar answered Oct 14 '22 16:10

sschuberth