We store all our application and db passwords in plain text in source control. We do this as our build/deploy process generates required configuration files and also does a
Store passwords in encrypted form. Write a custom routine that decrypts the passwords and updates the configuration files at build time. This can be easily integrated with the build tool like Ant.