SSH and Git Clone

后端 未结 1 900
无人共我
无人共我 2021-01-24 15:15

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

相关标签:
1条回答
  • 2021-01-24 15:36

    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.

    Clone the repository remotely on the server

    ssh root@server 'git clone gitproject /tmp/A'

    to issue the command on the server and have it cloned there.

    0 讨论(0)
提交回复
热议问题