Skip to content
Snippets Groups Projects
Commit 986c3eb9 authored by Jean-Paul Calderone's avatar Jean-Paul Calderone
Browse files

Fix the ssh key decoding problem

parent 5290d08b
No related branches found
No related tags found
3 merge requests!140Merge staging into production,!139Merge develop into staging,!138Fix deployment key whitespace
Pipeline #897 passed
...@@ -101,6 +101,11 @@ decode_deploy_key() { ...@@ -101,6 +101,11 @@ decode_deploy_key() {
# Decode the contents of the encoded key path into a decoded key path. # Decode the contents of the encoded key path into a decoded key path.
base64 --decode "${encoded_key_path}" > "${decoded_key_path}" base64 --decode "${encoded_key_path}" > "${decoded_key_path}"
# If OpenSSH doesn't find a newline after the last line of the key
# material then it fails to parse it. So, make sure there is one. If
# there was already one, it's fine to have an extra.
echo >> "${decoded_key_path}"
# Remove the key from the filesystem to reduce the chance of unintentional # Remove the key from the filesystem to reduce the chance of unintentional
# disclosure. Overall our handling of this key is still not *particulary* # disclosure. Overall our handling of this key is still not *particulary*
# safe or secure but that's why the key is only authorized to perform a # safe or secure but that's why the key is only authorized to perform a
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment