Tech-savvy users can even be encouraged to pull the code and send patches. :)
Tech-savvy users can even be encouraged to pull the code and send patches. :)
Worse still, they could be using passwords in an external service (eg, for a database) and have included those as well.
Environment variables get annoying quickly if you ever need different ones for different projects, and if you create a shell script (or Vagrantfile) to do it for you, you're still keeping the keys in the repo.
Git is designed to facilitate sharing. Repos are a poor tool for managing secrets, especially intermixed with a general software project.
Use something else for secrets. Ideally you would generate the secret on the same server on which it will be used and not move it over the network (except for a one-off backup).
//TODO replace password and username with user input
password = "johnsmithAdminpass1234"
username = "johnsmith01"
login(username, password)
If your test-DB is the same as your live one and username and password are real admin passwords, then you are in trouble. It's horrible and you shouldn't do this, but it happens.Edit: formatting