Force git pull and clone to not prompt for password

git

I host my own git repositories on my server and I can clone them with

git clone git@example.com:repo

I would like to know how to make cloning and pulling passwordless, so friends of mine could run those commands without asking for my credentials (for instance, for a zsh configuration).

Is there a way to do this so it acts similar to git hub? Where I can just clone and pull whatever repos and I want just not push to them?

Best Answer

You need to set up SSH key-based authentication on your server, so your friend can access your server without being prompted for a password.

Related Topic