Closed jacktose closed 1 year ago
It seems this is true in a cleaner situation, too: a recently-created WSL instance where I cloned the same yadm repo and haven't set any yadm config
settings.
No yadm config file:
$ yadm config -l
fatal: unable to read config file '/home/jack/.config/yadm/config': No such file or directory
$ cat "$HOME/.config/yadm/config"
cat: /home/jack/.config/yadm/config: No such file or directory
$ ls -a "$HOME/.config/yadm/"
./ ../ alt/ bootstrap encrypt
No yadm config settings in git config file:
$ cat "$HOME/.local/share/yadm/repo.git/config"
# (no [local] section at all)
New setting is stored in git config file:
$ yadm config local.user yourstruly
$ yadm config local.user
yourstruly
$ cat "$HOME/.local/share/yadm/repo.git/config"
...
[local]
user = yourstruly
yadm did not create config file:
$ cat "$HOME/.config/yadm/config"
cat: /home/jack/.config/yadm/config: No such file or directory
and weirdly (different from first example), cannot list config from git config file:
$ yadm config -l
fatal: unable to read config file '/home/jack/.config/yadm/config': No such file or directory
There are two sets of supported configurations.
The yadm.*
configs, which are stored in .config/yadm/config
. For example yadm.cipher
. These can be viewed with yadm config -l
.
The local.*
configs, which are stored in the local yadm repo's config .local/share/yadm/repo.git/config
. For example, local.class
. These can be viewed with yadm gitconfig -l
.
The local.*
variables are meant to be locally defined on a single host, so they are not stored in the global yadm config. Each time yadm is cloned the values for that host must be set manually, or via a bootstrap.
This is noted in the man page CONFIGURATION section which reads
The following five "local" configurations are not stored in the $HOME/.config/yadm/config, they are stored in the local repository.
Does this help clear up confusion?
Ah, thank you! Sorry I missed that line in the docs.
This question is about
Describe your question
A long time ago (yadm v1 probably), I set
local.class
andlocal.hostname
. Those settings are in$HOME/.local/share/yadm/repo.git/config
and there is no$HOME/.config/yadm/config
:If I change or add a value, it changes the git config file:
I can't find anything in the docs/manual describing that behavior. Is something broken? Should I somehow move those settings to
$HOME/.config/yadm/config
?