简体   繁体   中英

How to clone a Git repo from a VM?

I am currently developing inside a virtual Ubuntu box with Git, and I need to clone this repo to another CentOS VM. I don't know how to describe the git repo's location using the user@server:/path.git syntax.

Anyone can point me to the right direction? Thanks!

Can you ping one VM from the other? If so, then the IP you can ping you should be able to ssh to.

If you cannot ping, then perhaps you have a host which is reachable from both VMs. You could create a server repo there. For instance, github.com or bitbucket.com or the many many others might be a suitable third party host. Perhaps you could install a proxy (squid or dante-socks or something similar) to allow the VMs to talk to each other.

If you have email connectivity, perhaps you could mail git-bundles back and forth instead of using normal live git connections. There are many ways to do this, but we really need to know more about the networking and communications environment of these Vms to say more.

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