- Copy the private key to clipboard
- Run command
pbpaste | base64 | pbcopy
- The private key is now base64 encoded in the clipboard. Paste it to env variable e.g. to heroku or to .env file
const private_key = new Buffer(process.env.PRIVATE_KEY, 'base64').toString('ascii');
❤️ this and thank you. On systems with
xclip
and withoutpbcopy
andpbpaste
, try: