Closed choskeli closed 6 months ago
Using a debugger I found it is failing on the 131st file which is a private ssh key. Does this mean I encrypted this key with the incorrect passphrase?
Assuming that's the case, shouldn't it just print a non-fatal error including the file name and continue to apply the rest of the files? It had already decrypted most of my ssh keys successfully.
@twpayne thoughts?
There is --keep-going
/-k
flag which makes chezmoi continue when it encounters an error
Assuming that's the case, shouldn't it just print a non-fatal error including the file name and continue to apply the rest of the files? It had already decrypted most of my ssh keys successfully.
You're right. #3711 includes the file name (which was previously missing), and, as @ErrrorMaxx says, the --keep-going
flag tells chezmoi to continue to apply the rest of the files.
Thanks again for your input here -- it has resulted in a clear usability improvement for all users.
What exactly are you trying to do?
I am trying to use this method to only require the password the first time I apply. When I run apply as shown below, some of my files are copied into the appropriate locations but other files are only in my chezmoi source directory and don't get applied. Even many encrypted files are properly applied and decrypted such as all my ssh keys. But for example my .zshenv is only in the chezmoi source directory but not applied to the correct location (and it's not even encrypted).
What have you tried so far?
I've tried testing in a new environment (in a docker container) to verify the behavior I'm seeing is reproducible.
I've verified that my private key, public key and passphrase match up by using age to encrypt and decrypt a test file.
Where else have you checked for solutions?
Output of any commands you've tried with
--verbose
flagOutput of
chezmoi doctor
Additional context
Another thing that would be very useful would be if the verbose mode printed out each file as it was applied (not sure if I should open a feature request for this).