This is the very first time I have set up a git server, as a warning, and I don't admin开发者_StackOverflow中文版ister much.
I finally got a team of mine to switch over to git. Setting it up was surprisingly easy with the proper guide, I set up a user git
and put the keys of my teammates into the authorized_keys
file.
But they want chosen people outside the team to have read-only access to the repo, for demo purposes and such. I wanted to make just users for them and link the repo, but apparently they wouldn't want these guests to have any access to the server.
So is there a way I can make users to have read-only access by user/password or something else that kind of restricts their access?
EDIT: Thanks for your input, it will surely take me a while to set those up and try what's best.
We use gitolite to do just that. It's great.
Actually we use gitosis, for smaller environments it's quite ok. You can make repositories readonly for a group of users and writable for others. If you need more flexibility gitolite might be the right thing for you. If you're into ruby gitorious is an option as well.
For convenience I'd also suggest a web interface like gitweb, where you can limit the access via the web server.
See also this SO Question
You can use the git daemon for readonly access. Its publicly clonable, but very restricted in that you can only clone.
http://progit.org/book/ch4-9.html <- explains more
In the past I have given people a certain window of time to access the repo before turning it off.
精彩评论