reza
reza

Reputation: 6358

git remote repository and ssh protocol

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

Answers (4)

wickedpixel
wickedpixel

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

user1207456
user1207456

Reputation:

Two ways to solve this:

  1. Let them create RSA keys and upload the public key for the git user account.
  2. Install one of the open source applications designed for managing a private git server, such as Gitosis, Gitolite, or GitLab.

Upvotes: 0

fajran
fajran

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

Daniel Ribeiro
Daniel Ribeiro

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

Related Questions