简体   繁体   中英

Clone an git repo to an offline machine

I want to clone an git repo to an offline VM (Debian). I can ssh into the offline VM via my local machine (Mac) which has internet access. How can I clone a git repo to that offline VM?

Does simply scp the repo folder to the VM directory works? Like:

local_machine$ git clone https://github.com/rstudio/shiny-server.git

local_machine$ scp ~/shiny-server VM_machine:

local_machine$ ssh VM_machine:

VM_machine$ mv ~/shiny-server ~/workspace

Please help.

You can just clone the repository in the VM from your local machine:

VM_machine$ git clone local_machine:~/shiny-server ~/workspace

Reference: The SSH Protocol

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM