Sorry if I put this in the wrong category...please move if needed.

Could anyone recommend a good open source solution for web development collaboration software? Something with version control, access control, and will allow a number of developers to collaborate on several projects. Alert functions, chat, etc would be great as well.

All developers are remote, so I am looking for a web-based solution. Document management is nice, but not a top requirement.