Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separat file for clisync credentials #97

Open
hirnschmalz opened this issue Aug 24, 2016 · 5 comments
Open

Separat file for clisync credentials #97

hirnschmalz opened this issue Aug 24, 2016 · 5 comments

Comments

@hirnschmalz
Copy link

I really love the ct sync script! We always try to NOT save credentials in our Git repositories for security reasons. So it a would be great if it would be possible to store credentials in a separat file (e.g. clisync-credentials.yml) and put this file in the .gitignore

@kitzberger
Copy link
Contributor

Why don't you use ssh keys for logging into the remote server?

@hirnschmalz
Copy link
Author

I do use SSH keys for authentication. It's the database credentials which I'm talking about.

@kitzberger
Copy link
Contributor

Just put em into the .my.cnf file ;-)

@josefglatz
Copy link
Member

@kitzberger Are there already any possibilities to save db credentials for clisync.yml not in the file direct? If yes, could you tell me how you're doing this? We should add those information to our documentation

@kitzberger
Copy link
Contributor

kitzberger commented Nov 1, 2016

@josefglatz, since the user we're using to log onto the remote machine has got read access to the DB credentials in most cases anyway (for e.g. TYPO3 they're within LocalConfiguration.php), we'll simply put the DB credentials in the remote users home dir into the file .my.cnf:

[client]
user=typo3
password=secret_password
[mysql]
database=typo3_db

mysqldump does not like the database value to be specified in this file, so we're on specifying here for mysql. For this ct sync scenario it's not necessary at all (since the database mapping local_db:remote_db is mandatory in clisync.yml), but it's nice to just log on to the remote server via ssh, call mysql and jump right into the correct database without knowing shit.

Other db settings are possible, see http://dev.mysql.com/doc/refman/5.7/en/option-files.html for further information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants