Beejay
Beejay

Reputation: 303

Implementing git server which uses username and password to authenticate

I use 2 different machines to code every once in a while, and I was thinking about implementing a git server on my Raspberry Pi.

First of all, what's your best tutorial on handling all of the configuration and rights management?

Second, I want to authenticate with username and password combo when pushing and pulling, but I haven't found a way to do this, yet.

Right now I have a clean install of git-core.

Upvotes: 0

Views: 780

Answers (1)

iberbeu
iberbeu

Reputation: 16195

As git is a Distributed version control system you don't need an extra configuration to install a git server because actually there is no server or rather each repo could act as one. So the next steps would be enough

  • Install git in your server and create the repository there. Create bare repositories so that you can push to them. (As patthoyts explains on his comment)
  • Add this remote machine to the git-remotes in your local computers git remote add origin ssh://user@host/git/example (for a normal ssh configuration)
  • Grant ssh access to the local machines (take a look at an ssh tutorial in order to configure how to use Keys and avoid having to introduce user and pass every time)
  • From now on use this server as you would use github or whatever

Upvotes: 2

Related Questions