vkouea
Last Updated: February 25, 2016
·
1.325K
· simeonwillbanks
A624cb08e20db3ac4adb6380928a7b11

Dotfiles Meet Security

Dotfiles added to version control? Check.
Signed up for website requiring authentication? Check.
Use a command line tool to connect with said website? Check.
Running OS X? Check.

Authentication credentials should not be checked into version control. Use Security.

https://developer.apple.com/library/mac/#documentation/Darwin/Reference/Manpages/man1/security.1.html

Add password to keychain

$ security add-generic-password -a YOUR_LOCAL_OSX_USER -s github.password -w YOUR_GITHUB_PASSWORD

Export environment variable with value from key

$ export GITHUB_PASSWORD=$(security 2>&1 >/dev/null find-generic-password -gs github.password | sed 's/password: "\(.*\)"/\1/')

Automate export from dotfile

https://github.com/simeonwillbanks/dotfiles/blob/master/oh-my-zsh/custom/simeon.zsh#L8-L9

Stay safe my friends.

Say Thanks
Respond

2 Responses
Add your response

15480
Radar normal

The link you posted to your dotfiles is unavailable.

over 1 year ago ·
15515
A624cb08e20db3ac4adb6380928a7b11
over 1 year ago ·