简体   繁体   中英

Is it possible to clone a private git repo without adding ssh keys

I need to clone a private git repo (not from GitHub) on multiple computers.

Adding private keys of the individual computers for git repo could be a solution but I'm worried it would compromise security. I don't want the computers to be able to write on the repo, but just to be able to clone it. I think creating SSH keys for every computer is also bothersome.

Is there any recommendable solution to it?

If you only want those multiple machines/users to clone repository once, you may do the following.

  1. Clone the repository to a single local machine, using your credentials. This may be a --bare repository;
  2. Share the folder in local network. Or put the whole repo on a flash drive.
  3. On other machines just clone from that local shared folder.

Now if the original secured repo ever updates, you can pull to your local origin and then pull from it to multiple machines.

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