Skip to content

Commit 059a64f

Browse files
authored
Merge pull request #37 from jsegal205/gpg-update
add global gitconfig, gpg commit signing instructions
2 parents 247e0ae + 84b98f4 commit 059a64f

File tree

5 files changed

+43
-0
lines changed

5 files changed

+43
-0
lines changed

fresh-setup.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ chmod -R 755 ..
2828
# vscode setup
2929
./vscode/main.sh
3030

31+
# git setup
32+
./git/main.sh
33+
3134
# # should fix compdef errors like:
3235
# # ` compdef: unknown command or service: rails `
3336
# rm -f ~/.zcompdump*; compinit

git/.gitconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This is Git's per-user configuration file.
2+
[user]
3+
name = Jim Segal
4+
5+
signingkey = XXXXXXXXXXXXXX
6+
[pull]
7+
rebase = false
8+
[init]
9+
defaultBranch = main
10+
[commit]
11+
gpgsign = true

git/main.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
# get some helper functions up in here
6+
source ./utils/main.sh
7+
8+
##############################################
9+
10+
log "Setting up Git"
11+
12+
##############################################
13+
14+
FILE_NAME=".gitconfig"
15+
DEST_FILE=~/$FILE_NAME
16+
17+
log "Copying $FILE_NAME file"
18+
cp "./git/$FILE_NAME" $DEST_FILE

manual-steps.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,16 @@ I couldn't figure out how to automate this, maybe you will FUTURE Jim!
22

33
##########################################
44

5+
Setup gpg for git signed commits
6+
7+
Follow instructions:
8+
https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key
9+
10+
Then update git config:
11+
`git config --global user.signingkey XXXXX_NEW_KEY_XXXX`
12+
13+
##########################################
14+
515
Reset your Zsh configs
616
`source ~/.zshrc`
717

zsh/.zshrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,4 @@ alias dmb="git branch --merged | grep -Ev '(^\\*|main)\" | xargs -n 1 git branch
4343

4444
# Code things
4545
export ERL_AFLAGS="-kernel shell_history enabled"
46+
export GPG_TTY=$(tty)

0 commit comments

Comments
 (0)