tags:

views:

290

answers:

2

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?

+6  A: 

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

Roman Plášil
How can I install git into user directory? apt-get (for Ubuntu) doesn't seem to have such an option.
Mouk
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
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.
docgnome
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
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
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
@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
+1  A: 

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

Jacob R