Node.js, GIT, GPG settings, best global NPM packages
Its the part of 🎓 MacOS Starter Kit
1. nodemon
Installing
brew install gnupg2 pinentry-mac
ln -s /usr/local/bin/gpg /usr/local/bin/gpg2
List of all GPG keys in your db and copy <YOUR_SIGNING_KEY>, like B97E9964ACAD1907970D37CC8A9E3745558E41AF
gpg --list-keys
Setup GPG config
git config --global user.signingkey <YOUR_SIGNING_KEY>
git config --global commit.gpgsign true
git config --global gpg.program gpg
echo "pinentry-program /usr/local/bin/pinentry-mac" >> ~/.gnupg/gpg-agent.conf
Test GPG working correct
export GPG_TTY=$(tty)
echo "test" | gpg --clearsign
Try to commit something and save your passphrase in keychain.
export GPG_TTY=$(tty)
git commit -S -m "message"
Check that all correct
git log --show-signature -1
Если происходит ошибка
error: gpg failed to sign the data Напишите мне – разберемся
Source Tree использует другой gpg, нужно как-то подменить
Возможные решения:
killall gpg-agent && gpg-agent --daemon --use-standard-socket --pinentry-program /usr/local/bin/pinentry
- gnupg - Git error - gpg failed to sign data - Stack Overflow
- github - gpg failed to sign the data fatal: failed to write commit object Git 2.10.0 - Stack Overflow
- GnuPG - Download
- https://community.atlassian.com/t5/Bitbucket-questions/can-t-commit/qaq-p/719732
cannot run gpg: No such file or directory
git config --global gpg.program "$(which gpg)" https://stackoverflow.com/questions/36941533/git-hub-desktop-on-mac-error-cannot-run-gpg-no-such-file-or-directory