Originally I try to use gitosis to manage the git repositories in the company, and later notice gitolite is kind of enhancement of gitosis.
And also I heard gerrit could be used for the same purpose, but from the description, gerrit is mainly used for code review.
So which is the best way for setting up git server
Can you give some suggestion ?
BTW: http://gitorious.org/ is considered in the future
If you're going to use gerrit at all, you might as well use it for hosting as well as code review -- the workflow is easier that way, as gerrit will manage merging your reviewed code into its repository, and that's what you want to be publishing -- if you host elsewhere, you're going to have to either set up a method for automatically pulling from gerrit or you're going to have a way for your developers to bypass the code review by pushing their changes straight to the hosted repositories and ignoring gerrit altogether.
Recent versions of gerrit can integrate gitweb, giving you the nice web interface to browse with, but protected by the ACLs you've set up.