Back to Chezmoi

`keyring` *service* *user*

assets/chezmoi.io/docs/reference/templates/keyring-functions/keyring.md

2.70.2783 B
Original Source

keyring service user

keyring retrieves the value associated with service and user from the user's keyring.

OSKeyring
macOSKeychain
LinuxGNOME Keyring
WindowsWindows Credentials Manager
FreeBSDGNOME Keyring

!!! example

```
[github]
    user = {{ .github.user | quote }}
    token = {{ keyring "github" .github.user | quote }}
```

!!! warning

On FreeBSD, the `keyring` template function is only available if chezmoi
was compiled with cgo enabled. The official release binaries of chezmoi are
**not** compiled with cgo enabled, and `keyring` will always return an
empty string.