Skip to content

Commit

Permalink
Migrate SSH and Git to 1Password
Browse files Browse the repository at this point in the history
Signed-off-by: Marcus Crane <[email protected]>
  • Loading branch information
marcus-crane committed Apr 27, 2024
1 parent c684337 commit 515b2dd
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 15 deletions.
35 changes: 20 additions & 15 deletions dot_gitconfig.tmpl
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[user]
email = {{ .email }}
name = {{ .name }}
signingkey = 15DC6AC2068B5E35827845D20066202F5187A0C8
useConfigOnly = true
email = {{ .email }}
name = {{ .name }}
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIBYJRc1rj7YqWxo3dDALqnjPwCY9askwTo1gq1xO/QhB
useConfigOnly = true
[push]
default = current
[pull]
rebase = false
rebase = false
[commit]
gpgSign = true
gpgsign = true
verbose = true
[merge]
conflictstyle = zdiff3
Expand All @@ -17,22 +17,27 @@
[rebase]
autostash = true
[status]
showStash = true
showStash = true
[checkout]
workers = 0
workers = 0
[core]
excludesFile = "~/.gitignore"
hooksPath = "~/.githooks"
excludesFile = "~/.gitignore"
hooksPath = "~/.githooks"
{{- if (eq .chezmoi.os "darwin") }}
[gpg]
program = /usr/local/MacGPG2/bin/gpg2
program = /usr/local/MacGPG2/bin/gpg2
{{ else }}
[gpg]
format = ssh
[gpg "ssh"]
program = "/opt/1Password/op-ssh-sign"
{{- end }}
[url "ssh://[email protected]/"]
insteadOf = https://github.com/
insteadOf = https://github.com/
[init]
defaultBranch = "main"
defaultBranch = "main"
{{ $workLite := (eq (env "WORK_MODE") "1") }}
{{- if (or .workmode $workLite) }}
[includeIf "gitdir:~/Code/work/"]
path = ~/.work.gitconfig
{{- end }}
path = ~/.work.gitconfig
{{- end }}
1 change: 1 addition & 0 deletions dot_ssh/config.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ Include ~/Code/work/home/.ssh/config
{{ end }}

Host *
IdentityAgent ~/.1password/agent.sock
ControlMaster auto
ControlPath /tmp/SSH-%C
ControlPersist 720
Expand Down

0 comments on commit 515b2dd

Please sign in to comment.