I use a GPG key to sign my git commits.
An error like this one might be a sign of an expired GPG key.
error: gpg failed to sign the data fatal: failed to write commit object
#!/bin/bash | |
# Check if curl is installed | |
if ! [ -x "$(command -v curl)" ]; then | |
echo "Error: curl is not installed. Please install curl and try again." >&2 | |
exit 1 | |
fi | |
# Check if jq is installed | |
if ! [ -x "$(command -v jq)" ]; then |
#!/bin/sh | |
# usage: | |
# ql /tmp/file.jpg | |
# cat /tmp/file.jpg | ql | |
# cal -h | ql | |
if [ -z "$*" ]; then | |
cat > /tmp/ql.stdin | |
mime_type=$(file --brief --mime-type /tmp/ql.stdin) |
git_protocol: ssh | |
aliases: | |
personal: '!cp ~/.config/gh/hosts.yml.personal ~/.config/gh/hosts.yml && gh auth status' | |
work: '!cp ~/.config/gh/hosts.yml.work ~/.config/gh/hosts.yml && gh auth status' |
# prefixキーをC-tに変更する | |
set -g prefix C-t | |
# C-bのキーバインドを解除する | |
unbind C-b | |
# キーストロークのディレイを減らす | |
set -sg escape-time 1 | |
# ウィンドウのインデックスを1から始める |
# Recently I had to send a password to someone over Skype. Since that's obviously not a good idea, I asked for | |
# the person's public SSH RSA key, and used it to encrypt the password itself. | |
# Convert the public key into PEM format | |
ssh-keygen -f path/to/id_rsa.pub -e -m pem > ~/id_rsa.pub.pem | |
# Using the public pem file to encrypt a string | |
echo "sometext" | openssl rsautl -encrypt -pubin -inkey ~/id_rsa.pub.pem > ~/encrypted.txt |
Revised: 2019-11-28 16:16 GMT-6
This is a list of the key resources I have found useful. If you know of others, please post in a comment below, and I will add to this list.
I have tried to order this list in the order that, to me, is best for learning JXA from scratch. We all learn a bit diferently, so adjust to suit your style/needs. Please post if you have suggestions on learning JXA.
This guide will demonstrate the steps required to encrypt and decrypt files using OpenSSL on Mac OS X. The working assumption is that by demonstrating how to encrypt a file with your own public key, you'll also be able to encrypt a file you plan to send to somebody else using their private key, though you may wish to use this approach to keep archived data safe from prying eyes.
Assuming you've already done the setup described later in this document, that id_rsa.pub.pcks8 is the public key you want to use, that id_rsa is the private key the recipient will use, and secret.txt is the data you want to transmit…
$ openssl rand 192 -out key
$ openssl aes-256-cbc -in secret.txt -out secret.txt.enc -pass file:key