Git in a company - hosting own server
I am presenting Git to a 10 man programming team who currently use Visual Source Safe.
They need to host their Git server inside the company. Windows or Linux. Directory authentication is Novell eDirectory.
They need some granular security on who can push to the central server.
From:
https://stackoverflow.com/questions/923130/what-type-of-git-server-do-you-use-or-how-do-you-use-git
Maybe a workflow could be:
- Setup 10 users on the server.
- Setup a common directory on the servers filesystem that the 10 users have write access to
- Push files to the server via SSH eg git push dave@test.com:user1/project.git
- But then I need that the keys are installed on the server
Question: Does anyone use a workflow like this successfully in a company. What works? This is starting t开发者_运维问答o feel like most people use Git with GitHub etc..
[Edit]: Please see Choosing a source control system: logical next steps after VSS Maybe Git isn't the right fit for this team.
It's certainly possible to have a self-hosted git repository with access control. Typically what one would do is create a account named git
on the server machine, set the shell of that account to git-shell
, which is a limited shell designed for use by git only, and then put the public keys for each authorized user in the git
-user's .ssh/authorized_keys file.
http://blog.commonthread.com/2008/4/14/setting-up-a-git-server has most of the rest of the actual details.
We're using gitosis where devs push to and pull from. See gitosis.
That's pretty much the technique I use. It's a hassle to set up accounts and keys for everyone, but that only needs to be done once.
As a bonus if you lay things out right you can have a read-only repository available at git://whatever or http://whatever and your writable repository at git+ssh://whatever.
EDIT: gitosis does look pretty neat, although you might want to have individual accounts for all your developers at some stage anywhere.
The world has changed a lot in the meanwhile, and I think that http://gitblit.com/ is currently one of the best solutions (depending on your requirements):
- Can be setup easily with HTTPS only.
- Integrates in the company LDAP.
- Allows to define groups / teams, and fine graned access control to the repositories.
- Is open source, so cheap to install (compared to Github and others)
So if you don't want to have a new server for each and every team, this is really an option. We like it!
There are lots of git management GUIs out there if you want to run it yourself. gitorious is nice, for example.
For your authentication needs, that's mostly up to you. You may have a hard time having ssh honor your preferred auth technique (last time I did anything like that, I modified ssh to read keys out of LDAP).
The web interface could do whatever you'd like, I'm sure. I'd probably just leave it open on the inside of the network, though.
Im quite suprised nobody mentioned the open-source project gogs: http://gogs.io which basically offers the same what gitlab does (without including Wiki, Code Review, Code Snippets), but with minimal system resources(low footprint), being perfect to run in a Raspberry Pi for example. Installation and maintenance is also way simpler.
I'd be a bit concerned about suggesting git
for your version control system. Visual Source Safe is about as Microsoft of a product as one can get, while git is on the other extreme and barely functions on Windows.
TortoiseGit, a Windows interface to git, is now available. This tempers my original response, as I feel having a GUI access to your source-control system is very important for the majority of Windows developers.
精彩评论