Skip to content

Instantly share code, notes, and snippets.

@goncha
Created October 11, 2014 02:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save goncha/aa6d8f6629958353b240 to your computer and use it in GitHub Desktop.
Save goncha/aa6d8f6629958353b240 to your computer and use it in GitHub Desktop.
Encrypt password in source control
.PHONY: _pwd_prompt decrypt_conf encrypt_conf
CONF_FILE=conf/settings.json
# 'private' task for echoing instructions
_pwd_prompt:
@echo "Contact jeresig@gmail.com for the password."
# to create conf/settings.json
decrypt_conf: _pwd_prompt
openssl cast5-cbc -d -in ${CONF_FILE}.cast5 -out ${CONF_FILE}
chmod 600 ${CONF_FILE}
# for updating conf/settings.json
encrypt_conf: _pwd_prompt
openssl cast5-cbc -e -in ${CONF_FILE} -out ${CONF_FILE}.cast5
# for updating conf/settings.json
encrypt_conf: _pwd_prompt
openssl cast5-cbc -e -in ${CONF_FILE} -out ${CONF_FILE}.cast5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment