0

In a public repository, when you allow people to pull a branch:

How do you allow them to have access to your database (any of your databases for that matter) i.e. put the connection codes in, without letting them know your credentials?

If people want to help with your site and need to access your database, what's used to secretly grant them access, if the site needs that database to function? do they just need to donwload a local copy of the database?

For example, when someone pulls the code for stackoverflow, do they also include a scrubbed version of the database to play with?

1 Answer 1

4

Generally speaking the information in the database is not relevant when you are pulling down code, only the schema and possibly lookup tables. Nothing more than this would generally be kept in a repository. With regards to connecting to the database, most projects will .gitignore the actual configuration file, but have something like a config.dist file, that will contain a blueprint for the configuration. The user can then clone the project, either import the database, or more likely run a migration / install script, then copy and update the config template with the account details for the database on their system. Again this step will often be done by an install script.

The exact use case will vary, but there are many examples in the PHP world such as the symfony2 project on GitHub.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.