This is like, your programming man.
Dude, you are getting some advice:
1) Credentials always in config files in a separate project not under version control. Config file reading is easy and can be done in 5 lines or less. Use XML, atttribute = value, whatever.
2) When needed, slurp the credential files