11

I have full access to some folder on a remote Linux server over ssh and scp. I can upload and download files but not install apps. Now I want to put a git repository on this server. When I try to clone from an over scp copied repository I get the following error message:

sgit-upload-pack: Command not found
fatal: The remote end hung up unexpectedly

Cloning using the same command from Github works as expected. Do I need Git installed on the server? If yes, is there any work around?

Mouk
  • 1,807
  • 2
  • 18
  • 26

3 Answers3

8

I think that git needs to be there. But you can simply install it in the directory you have access to.

Roman Plášil
  • 1,941
  • 2
  • 17
  • 27
  • How can I install git into user directory? apt-get (for Ubuntu) doesn't seem to have such an option. – Mouk Oct 02 '09 at 13:28
  • You can install it manually. Download the source distribution from http://git-scm.com/download, unpack and then follow the instructions in INSTALL. You will probably need a compiler and so on. – Roman Plášil Oct 02 '09 at 14:25
  • To go along with what Roman said, on a Debian based system you should install build-essentials to get gcc and make and so forth. – baudtack Oct 03 '09 at 01:10
  • The problem is, I can install nothing. And Git seems to have a lot of dependencies. I guess, I will give up compiling Git and try ... something else. Thanks anyway. – Mouk Oct 04 '09 at 16:56
  • If you want to play, you could get a binary distribution for your linux and unpack it by hand (but you would still need the runtime dependencies). – Roman Plášil Oct 04 '09 at 18:07
  • 1
    To be more exact you need only `git-upload-pack` / `git-receive-pack` from the whole git installed somewhere; you can then pass appropriate option to "git clone" or "git push" respectively, to point where this command is on remote server. – Jakub Narębski Oct 04 '09 at 20:58
  • @Mouk: the dependencies are: zlib, ssh (for SSH access), and of course build dependencies. The rest of dependencies you can configure out. – Jakub Narębski Oct 04 '09 at 21:05
  • That's too bad. I'm currently needing this for a Solaris server on which git is simply not installable. I wish git could work like emacs's tramp.This morning i've found [git-ftp](https://github.com/resmo/git-ftp) which is a partial solution to push files. – Benoît Oct 13 '12 at 07:59
8

You could use SSHFS and mount the directory on your local machine, and then run Git locally.

Jacob Rask
  • 22,804
  • 8
  • 38
  • 36
  • You can do that using Dokan SSH Filesystem. I found a great tutorial : http://gusclass.com/blog/2012/12/27/remote-mounting-ssh-filesystems-from-windows-8 – null Jul 15 '13 at 18:49
0

You would need enhanced access for SSHFS, I would imagine.

This would be a really cool addition to Git, and I believe there is some way to do it, though I haven't found it... yet. I am using git in combination with rsync to the remote server for a similar situation.

arafeandur
  • 196
  • 1
  • 5