Reputation: 6358
I have a git server and it has a user called git For remote clients, they use git@gitserver to clone, push and pull. For this to work, I need to give the password for user git.
Is there a better way of dealing with this?
Upvotes: 0
Views: 699
Reputation: 46
Ideally you want each remote client/user to have his/her own login. You'll need each client to create a private key, generate a public key (using PuTTYgen or similar), and then add the public key to your authorized keys.
Here's a good place to start.
Upvotes: 1
Reputation:
Two ways to solve this:
Upvotes: 0
Reputation: 2809
You can use ssh key for authentication. Each user make their own ssh key pair and then the public keys are collected inside ~/.ssh/authorized_keys
of the git user. After this is set up, users don't need to enter nor know the password of the git user.
Upvotes: 2
Reputation: 10234
They should use the ssh protocol. The remote server needs to know each client's rsa key, and they won't need to enter the password for every remote action.
Upvotes: 0