Skip to content
Discussion options

You must be logged in to vote

Yes, as_file = true is the right delivery mode when the consumer expects a file path, but it only writes the value that was stored; it cannot restore a newline that was already removed.

I found two ways the final newline can be lost:

  • fnox set SSH_PRIVATE_KEY < ~/.ssh/id_ed25519 currently trims stdin before storing it.
  • fnox set SSH_PRIVATE_KEY "$(cat ~/.ssh/id_ed25519)" loses trailing newlines through shell command substitution.

That is also why --base64-encode did not help when fnox read the original key from stdin: trimming happened before encoding.

I opened #730 to add an exact file-input path. After it lands, the intended workflow is:

fnox set SSH_PRIVATE_KEY --from-file ~/.ssh/id_ed…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

jdx
Aug 19, 2026 — with coder-jdx
Maintainer

You must be logged in to vote
0 replies
Answer selected by zeroware
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants