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

189 views Asked by At

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?

1

There are 1 answers

0
Nick Volynkin On BEST ANSWER

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.