Commit 83fe6f288 added tr -d '\n\r' to sanitize host and username values before base64 encoding in the host-access secret. This fixed trailing newlines in host/username but also stripped newlines from id_rsa, breaking the PEM format.
Commit 0e675cb76 reverted the fix entirely, which brought back the trailing newline problem — SSH fails with Could not resolve hostname because the host value includes \n.
Neither state works:
main (reverted): valid SSH key, broken hostname
83fe6f288: clean hostname, broken SSH key
The fix is to sanitize host and username but not id_rsa:
host: $(cat /opt/host-info/host | tr -d '\n\r' | base64 -w0)
username: $(cat /opt/host-info/username | tr -d '\n\r' | base64 -w0)
id_rsa: $(cat /opt/host-info/id_rsa | base64 -w0)
Affects all tkn/infra-aws-*.yaml tasks.
Commit
83fe6f288addedtr -d '\n\r'to sanitize host and username values before base64 encoding in the host-access secret. This fixed trailing newlines in host/username but also stripped newlines fromid_rsa, breaking the PEM format.Commit
0e675cb76reverted the fix entirely, which brought back the trailing newline problem — SSH fails withCould not resolve hostnamebecause the host value includes\n.Neither state works:
main(reverted): valid SSH key, broken hostname83fe6f288: clean hostname, broken SSH keyThe fix is to sanitize host and username but not id_rsa:
Affects all
tkn/infra-aws-*.yamltasks.