Closed x80486 closed 1 year ago
- Place the following content
{{.git.gitlab.email}} namespaces=git {{include .chezmoi.homeDir/.ssh/gitlab-personal.pub | trim}}
The error is correct. Instead, do:
{{ .git.gitlab.email }} namespaces=git {{ include (joinPath .chezmoi.homeDir ".ssh/gitlab-personal.pub") | trim }}
You need to quote paths, and you can’t just concatenate variables and strings that way in Go templates (which is what chezmoi uses).
Interesting. It works that way. Now I don't understand how it worked before 😑
Thanks for the solution! :1st_place_medal:
By the way, really awesome tool! :bowing_man:
Description
I configured
allowed_signers
(forGit
) as a template file — usingchezmoi
version2.34.0
.After upgrading to version
2.40.3
,chezmoi
states that:chezmoi: template: private_dot_config/git/readonly_allowed_signers.tmpl:1: bad character U+002F '/'
To Reproduce
${HOME}/.config/git/allowed_signers
file and set it toread only
for allchezmoi
to manage it — read:chezmoi add --template ...
{{.git.gitlab.email}} namespaces=git {{include .chezmoi.homeDir/.ssh/gitlab-personal.pub | trim}}
chezmoi status
Expected Behavior
Provided
.git.gitlab.email
is configured correctly and${HOME}/.ssh/gitlab-personal.pub
is present,chezmoi status
shouldn't display any warning(s).Output of Command With the
--verbose
FlagOutput of
chezmoi doctor
Additional Context
N/A