Set the default access permissions of the project to public and allow Source Code to view permission for all or specific repositories to All users while restricting other permissions.
To give read-only anonymous access to cvs/svn repository within a project while still restricting write access, you could set the default access permissions of the project to public with Source Code view permission open to all users, while restricting other permissions to specific user classes.
Note: In Step 5 above, it is possible for you to choose whether you want to give View access to All users for all repositories or a specific repository.