Git over ssh without Git being installed on server

2019-03-19 12:29发布

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?

标签: git ssh
3条回答
手持菜刀,她持情操
2楼-- · 2019-03-19 12:31

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.

查看更多
放荡不羁爱自由
3楼-- · 2019-03-19 12:38

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

查看更多
啃猪蹄的小仙女
4楼-- · 2019-03-19 12:38

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

查看更多
登录 后发表回答