Closed andar1an closed 9 months ago
Was my mistake, bad 1password command substitution.
however, this will fail:
nix run nixpkgs#ssh-to-age -- -private-key -i $(op read "op://Vault/Secret/private key?ssh-format=openssh") -o ~/.config/sops/key.txt
Can get around with:
# read ssh key from 1password into file
echo "$(op read "op://Vault/Secret/private key?ssh-format=openssh")" > ~/.ssh/id_ed25519
# convert ssh key to age
nix run nixpkgs#ssh-to-age -- -private-key -i ~/.ssh/id_ed25519 -o ~/.config/sops/key.txt
running
nix run nixpkgs#ssh-to-age -- -private-key -i ~/.ssh/id_ed25519 -o ~/.config/sops/key.txt
when key begins with:
will result in error:
got ed25519.PrivateKey key type but: only ed25519 keys are supported