feat .gitconfig: signingkey GPG簽名綁定
This commit is contained in:
parent
cee037e8dd
commit
7de43b89a5
@ -1,5 +1,6 @@
|
|||||||
{{- $name := promptStringOnce . "name" "請輸入您的姓名" -}}
|
{{- $name := promptStringOnce . "name" "請輸入您的姓名" -}}
|
||||||
{{- $email := promptStringOnce . "email" "輸入您的Email地址" -}}
|
{{- $email := promptStringOnce . "email" "輸入您的Email地址" -}}
|
||||||
|
{{- $signingkey := promptStringOnce . "signingkey" "輸入您的GPG金鑰ID (可從 gpg --list-secret-keys --keyid-format=long 去找)" -}}
|
||||||
|
|
||||||
{{- $hosttype_choices := list "desktop" "server" "unroot_server" "manual" -}}
|
{{- $hosttype_choices := list "desktop" "server" "unroot_server" "manual" -}}
|
||||||
{{- $hosttype := promptChoice "What type of host are you on" $hosttype_choices -}}
|
{{- $hosttype := promptChoice "What type of host are you on" $hosttype_choices -}}
|
||||||
@ -32,6 +33,7 @@ sourceDir = "~/.local/share/chezmoi"
|
|||||||
[data]
|
[data]
|
||||||
name = {{ $name | quote }}
|
name = {{ $name | quote }}
|
||||||
email = {{ $email | quote }}
|
email = {{ $email | quote }}
|
||||||
|
signingkey = {{ $signingkey | quote }}
|
||||||
serverStyle = {{ $isServer }}
|
serverStyle = {{ $isServer }}
|
||||||
unRootMode = {{ $unRootMode }}
|
unRootMode = {{ $unRootMode }}
|
||||||
enableSixel = {{ $enableSixel }} {{/* TODO: packages.toml還沒處理 */}}
|
enableSixel = {{ $enableSixel }} {{/* TODO: packages.toml還沒處理 */}}
|
||||||
|
@ -220,6 +220,9 @@ function __pb10k_bottom {
|
|||||||
# ----以下是我的自訂內容 ------------------------------------------------------
|
# ----以下是我的自訂內容 ------------------------------------------------------
|
||||||
export LANG=zh_TW.UTF-8 #macOS要手動指定,不然被ssh連入使用時會變亂碼
|
export LANG=zh_TW.UTF-8 #macOS要手動指定,不然被ssh連入使用時會變亂碼
|
||||||
|
|
||||||
|
{{ if .signingkey }}
|
||||||
|
export GPG_TTY=$(tty){{ end }}
|
||||||
|
|
||||||
# overwrite ls
|
# overwrite ls
|
||||||
if command -v eza &> /dev/null; then
|
if command -v eza &> /dev/null; then
|
||||||
alias ls='eza --color=always --icons=always'
|
alias ls='eza --color=always --icons=always'
|
||||||
|
@ -3,9 +3,16 @@
|
|||||||
smudge = git-media-smudge %f
|
smudge = git-media-smudge %f
|
||||||
[user]
|
[user]
|
||||||
name = {{ .name | quote }}
|
name = {{ .name | quote }}
|
||||||
email = {{ .email | quote }}
|
email = {{ .email | quote }}{{ if .signingkey }}
|
||||||
|
signingkey = {{ .signingkey | quote }}{{ end }}
|
||||||
|
{{ if .signingkey }}
|
||||||
|
[commit]
|
||||||
|
gpgsign = true
|
||||||
|
|
||||||
|
[tag]
|
||||||
|
gpgSign = true
|
||||||
|
{{ end }}
|
||||||
[core]
|
[core]
|
||||||
editor = vim
|
|
||||||
excludesfile = {{ joinPath .chezmoi.homeDir ".gitignore_global" }}
|
excludesfile = {{ joinPath .chezmoi.homeDir ".gitignore_global" }}
|
||||||
[difftool "sourcetree"]
|
[difftool "sourcetree"]
|
||||||
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
|
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
|
||||||
|
@ -189,6 +189,10 @@ test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell
|
|||||||
export PATH="$PATH:$HOME/bin"
|
export PATH="$PATH:$HOME/bin"
|
||||||
zinit light mass8326/zsh-chezmoi
|
zinit light mass8326/zsh-chezmoi
|
||||||
|
|
||||||
|
{{ if .signingkey }}
|
||||||
|
export GPG_TTY=$TTY{{ end }}
|
||||||
|
gpgconf --launch gpg-agent
|
||||||
|
|
||||||
# 自動補上 noglob 並禁用 Zsh 的 globbing 解析
|
# 自動補上 noglob 並禁用 Zsh 的 globbing 解析
|
||||||
function git_pushmulti() {
|
function git_pushmulti() {
|
||||||
# 手動處理方括號或括號內容,並進行推送
|
# 手動處理方括號或括號內容,並進行推送
|
||||||
|
Loading…
x
Reference in New Issue
Block a user