将git repo克隆到脱机计算机



我想将git repo克隆到离线VM(Debian)。我可以通过我的本地机器(Mac)通过ssh进入离线虚拟机,该机器可以访问互联网。如何将git repo克隆到脱机虚拟机?

简单地将repo文件夹scp到VM目录是否有效?类似:

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

请帮忙。

您只需从本地机器clone VM中的存储库:

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

参考:SSH协议

最新更新