Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I would like to set a GIT server and let my developers to login using username and password in order to commit and make changes to the projects. I need also to manage developer access to projects (I think I should use gitolite for this).

How can I do that?

I am used to SVN which is easy because you can set username and password for each developer, which can easily access the repository without having the generate an ssh key and put it on the server.

Thanks

share|improve this question

3 Answers 3

Perhaps you aren't aware of this, but Git is a distributed VCS. Thats essential to your understanding. OTOH SVN and CVS are centralized. You can still have a central repository in Git, and if you do, your users will need to be able to log into that server using SSH or HTTP access, look it up. Generally speaking, Git depends on the server's authentication.

So to make a git repo on a Debian or Ubuntu server for centralized use:

# apt-get install git
# cd /var/git
# git init --bare myreponame.git
# adduser <username>    as needed

At this point you have an empty repo. To clone it to your desktop Debian or Ubuntu:

For SSH connections: look up ssh keygen and set up a passwordless connection to your server- keygen and sharing is only two commands.

To clone a repo:

$ git clone <server>:/var/git/myreponame.git

$ cd myreponame

Now you can add files and directories... when you have used git add and git commit, then you can use git push to push commits to the central repo.

  • There are non-bare repositories, you must read up on this, use the standard Git references, just Google.
  • Warning a "shared repository" is not what you think from the name.
share|improve this answer

gitolite uses public key authentication, and FWIW, you don't need to generate everybody's key pairs. Just ask them for the public key.

The configuration in gitolite is just another repository, you just need to grant access and add the public keys accordingly.

share|improve this answer

I would like to set a GIT server and let my developers to login using username and password in order to commit and make changes to the projects. I need also to manage developer access to projects

I would suggest to use GitLab Community Edition. As it has all features that you need and many more.

I am used to SVN which is easy because you can set username and password for each developer, which can easily access the repository without having the generate an ssh key and put it on the server.

actually ssh key is very comfortable, because you don't need to enter login/password every time as you want to clone/pull/push/etc.

Any way with gitlab you can use login/password and/or ssh key.

share|improve this answer
    
Yes I think SSH key is comfortable but actually for a windows developer with no experience with SSH keys it would be a little bit tricky. –  Giorgio Jun 8 at 17:41
    
I had problem on installing Gitlab in debian wheezy using the deb package, I should try the manual installation. –  Giorgio Jun 8 at 17:43
    
I have installed and running gitlab on CentOS-6.5 without any problem. Manual installation it's a bad idea, imho. At least if you didn't work with Gitlab before. –  ALex_hha Jun 9 at 15:23
    
I manually installed it and it works fine. The only problem is the memory consumption which is crazy, almost 500MB!! –  Giorgio Jun 9 at 16:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.