How I setup a new Mac.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"git clone https://github.com/caarlos0/mac.git
cd mac
brew bundlegit clone https://github.com/caarlos0/dotfiles.git ~/.dotfiles
cd ~/.dotfiles
./script/bootstrap
zshNot so-sensible defaults:
./macos/set-defaultsCreate a new SSH key or copy the previous one into ~/.ssh. That should be
it.
Also fix perms:
$ chmod 0600 ~/.ssh/id_rsaCreate default config files:
gpg --list-keysSetup pinentry:
$ brew install pinentry-mac
$ echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
$ killall gpg-agentImport the key:
$ export GPG_TTY=$(tty)
$ keybase pgp export -q C14AB940 | gpg --import
$ keybase pgp export -q C14AB940 --secret | gpg --import --allow-secret-key-importChange C14AB940 with your key id.
Setup git:
$ git config --global gpg.program $(which gpg)
$ git config --global user.signingkey C14AB940
$ git config --global commit.gpgsign trueChange C14AB940 with your key id.
Test it:
$ mkdir -p /tmp/test
$ cd $_
$ git init
$ git commit --allow-empty -m 'signsss'
$ git log --show-signatureThat's it!
sudo reboot🍻