Added first use of rbw to extract ssh key for gitconfig

This commit is contained in:
Eric Renfro 2023-12-27 17:20:01 -05:00
parent d113086f8e
commit a872a8099e
Signed by: psi-jack
SSH key fingerprint: SHA256:1TKB8Z257L8EHK8GWNxKgMhD8a+FAR+f+j3nnlcuNVM
2 changed files with 18 additions and 5 deletions

View file

@ -5,9 +5,17 @@
{{ $email := "psi-jack@linux-help.org" -}}
{{ $work := false -}}
{{ $ssh := "" -}}
{{ if ne $personal true -}}
{{ $email := promptStringOnce . "email" "What is your email" -}}
{{ $work := promptBoolOnce . "work" "Is this for work" -}}
{{ $email = promptStringOnce . "email" "What is your email" -}}
{{ $work = promptBoolOnce . "work" "Is this for work" -}}
{{ if eq $work true -}}
{{ $ssh = (rbwFields "ssh-key-work").publickey.value -}}
{{ else -}}
{{ $ssh = (rbwFields "ssh-key").publickey.value -}}
{{ end -}}
{{ else -}}
{{ $ssh = (rbwFields "ssh-key").publickey.value -}}
{{ end -}}
{{ $osid := .chezmoi.os -}}
@ -17,9 +25,13 @@
{{ end -}}
{{ end -}}
encryption = "age"
[data]
name = "Eric Renfro"
email = {{ $email | quote }}
ssh = {{ $ssh | quote }}
osid = {{ $osid | quote }}
personal = {{ $personal }}

View file

@ -1,8 +1,9 @@
[user]
name = Eric Renfro
email = psi-jack@linux-help.org
name = {{ .name }}
email = {{ .email }}
#signingkey = 25787986B19167B89BFF55CF3159FF4CB13EBFB4
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILOOehoX8okqwKyFj4ozRODK0tIb3aeHlYC9re1/3IbC Eric Renfro (Home/ed25519)
#signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILOOehoX8okqwKyFj4ozRODK0tIb3aeHlYC9re1/3IbC Eric Renfro (Home/ed25519)
signingkey = {{ .ssh }}
[gpg]
#program = gpg2
format = ssh