Setting up a git server
Solution 1:
You can use the tutorial to install a Git server as aking1012 proposed you or you could just install SSH server on your EC2 instance (probably it would be wise to secure it and change the default port).
Git can be server-less you init your repository and then you access it from remote via SSH. So instructions like this on the Ubuntu Server should do it:
GIT_DIR=project.git git init
cd project.git
git --bare update-server-info
cp hooks/post-update.sample hooks/post-update
Finally install SSH on your server:
sudo apt-get install ssh-server
Now, you should configure SSH to secure it.
It's time to put your project online (the data you already have on your development machine):
git push ssh://<username>@<remote-git-hostname>/path/to/project.git master
And now you can start cloning around. You go on your development machine:
git clone ssh://<username>@<remote-git-hostname>/path/to/dir.git
Check this excellent resource on Git.
And for generating your ssh keys for safer authentication, you can read this article about SSH authentication.
Solution 2:
For all my Git server setups I use Gitolite which allows for a security granularity of "per-branch" access. Setup is pretty straight forward if you're doing it on a remote server it's as easy as running an interactive script. In addition to this "easy-to-setup" nature it also has a package in Natty and Maverick
sudo apt-get install gitolite
This won't provide a web frontend like Github, or Gitweb - but you can easily configure and install those on top of something like Gitolite.
Solution 3:
I like gitolite. The Pro Git book has a section on it but I recommend reading the whole book.
As for your multiple users requirement:
Gitolite allows you to specify permissions not just by repository (like Gitosis does), but also by branch or tag names within each repository. That is, you can specify that certain people (or groups of people) can only push certain “refs” (branches or tags) but not others.
Solution 4:
http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way can be slightly modified to suit your purposes...a similar tutorial http://blog.agdunn.net/?p=277.