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" -}} {{ $email := "psi-jack@linux-help.org" -}}
{{ $work := false -}} {{ $work := false -}}
{{ $ssh := "" -}}
{{ if ne $personal true -}} {{ if ne $personal true -}}
{{ $email := promptStringOnce . "email" "What is your email" -}} {{ $email = promptStringOnce . "email" "What is your email" -}}
{{ $work := promptBoolOnce . "work" "Is this for work" -}} {{ $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 -}} {{ end -}}
{{ $osid := .chezmoi.os -}} {{ $osid := .chezmoi.os -}}
@ -17,9 +25,13 @@
{{ end -}} {{ end -}}
{{ end -}} {{ end -}}
encryption = "age"
[data] [data]
name = "Eric Renfro" name = "Eric Renfro"
email = {{ $email | quote }} email = {{ $email | quote }}
ssh = {{ $ssh | quote }}
osid = {{ $osid | quote }} osid = {{ $osid | quote }}
personal = {{ $personal }} personal = {{ $personal }}

View file

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