0

So I have SSH GIT access to a server of mine (which is using git-shell)

My question is, can I instruct that server (lets call it server A) to clone a repo remote from it (on a different server, lets call that server B) onto itself? So... have server A itself run something locally like

git clone https://serverb.com/example.git /serverAFolder/path/here

But send the command to run such a task remotely from my client Mac via SSH git-shell

-- Ideally i'd like something like

ssh gituser@servera.com git clone https://serverb.com/example.git /serverAFolder/path/here

But that doesn't seem to be allowed or working...

(My backup plan is to setup a simple bash script to do what I require inside the ~/git-shell-commands folder to just run the command I require that way... but I was wondering if there was a better way first.)

Many thanks,

mrmrw
  • 120
  • 9
  • First find out how you clone locally when running on A (just use file paths instead of URLS) and then find out how to send this command from B to A. – Thorbjørn Ravn Andersen Mar 04 '16 at 00:22
  • Thats what I was worried the answer would be (i.e. use a different mechanism) -- it is not possible via git-shell? – mrmrw Mar 04 '16 at 10:11
  • I have no idea. The mechanism is not different. You just invoke the command remotely. If you cannot do that your question needs improvement with more information. – Thorbjørn Ravn Andersen Mar 04 '16 at 11:18

0 Answers0