- set up git credential helper in .gitconfig
[credential]
helper = /usr/share/git/credential/netrc/git-credential-netrc.perl
- add login configuration to .netrc
machine github.com
login <email (or username?)>
password <password>
protocol https
machine bitbucket.org
login <username (not email!)>
password <password>
protocol https
- encrypt .netrc (output MUST be .netrc.gpg otherwise helper won't decrypt)
gpg -ea --output .netrc.gpg .netrc
shred .netrc