Is it possible to ssh to a remote server and trigger a git clone. ie I need to ssh to server A, create a folder /tmp/A and clone a repository with all its contents on A. The ssh
You said: "I feel the script steps are run asynchronously"
,
this indicates you are doing all this in a script and therefore your git init
and git clone
are done local. You won't actually need git init
here.
ssh root@server 'git clone gitproject /tmp/A'
to issue the command on the server and have it cloned there.