Skip to content

Latest commit

 

History

History
90 lines (58 loc) · 2.28 KB

nodejs.md

File metadata and controls

90 lines (58 loc) · 2.28 KB

🎓 Node.js Starter Kit

Node.js, GIT, GPG settings, best global NPM packages

Its the part of 🎓 MacOS Starter Kit

	1. nodemon

TODO: Node.js

NPM

Legacy Peer Deps problem

TODO: NPM global libs

GPG

Installing

brew install gnupg2 pinentry-mac
ln -s /usr/local/bin/gpg /usr/local/bin/gpg2

Generate your key

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

Source Tree

Если происходит ошибка

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

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

TODO: Git flow