will.brien + sysadmin + git   2

How to convert existing non-empty directory into a Git working directory and push files to a remote repository - Stack Overflow
Given you've set up a git daemon on <url> and an empty repository:

cd <localdir>
git init
git add .
git commit -m 'message'
git remote add origin <url>
git push -u origin master
git  cli  linux  reference  sysadmin  work 
june 2017 by will.brien
John Resig - Keeping Passwords in Source Control
It has to deal with the eternal question: How do you store sensitive configuration options (such as usernames, passwords, etc.) in source control? Typically what I’ve done is to just punt on the problem entirely. I create a dummy configuration file, such as conf/sample-settings.json which has the basic structure but none of the details filled out. For example:

conf/sample-settings.json

// Copy to conf/settings.json
// and fill these in with your login details!
{
"db": {
"username": "",
"password": ""
}
}

If someone else needed the details I would just email it to them, or some such (not ideal). Especially when it came time to add additional information to the file or make other changes.

The technique I picked up from Craig was to, instead, keep an encrypted version of the configuration file in source control and then provide a means through which the user can encrypt and decrypt that data.

In this case you can still have the a dummy config file, if you wish.
git  programming  security  sysadmin  devops  <todo> 
november 2014 by will.brien

Copy this bookmark:



description:


tags: