You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to encrypt an entire directory, and the only way I know of to do that is to tar up the file and encrypt it using Salt's GPG key. Then add it to pillars.
The problem comes when I try to create the file on the receiving end and I get this error:
'ascii' codec can't decode byte 0x8b in position 1: ordinal not in range(128)
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/salt/pillar/__init__.py", line 736, in render_pstate
**defaults)
File "/usr/lib/python2.7/dist-packages/salt/template.py", line 101, in compile_template
ret = render(input_data, saltenv, sls, **render_kwargs)
File "/usr/lib/python2.7/dist-packages/salt/renderers/gpg.py", line 350, in render
return _decrypt_object(gpg_data, translate_newlines=translate_newlines)
File "/usr/lib/python2.7/dist-packages/salt/renderers/gpg.py", line 329, in _decrypt_object
translate_newlines=translate_newlines)
File "/usr/lib/python2.7/dist-packages/salt/renderers/gpg.py", line 329, in _decrypt_object
translate_newlines=translate_newlines)
File "/usr/lib/python2.7/dist-packages/salt/renderers/gpg.py", line 325, in _decrypt_object
return _decrypt_ciphertexts(obj, translate_newlines=translate_newlines)
File "/usr/lib/python2.7/dist-packages/salt/renderers/gpg.py", line 307, in _decrypt_ciphertexts
ret, num = GPG_CIPHERTEXT.subn(lambda m: _decrypt_ciphertext(m.group()), cipher)
UnicodeDecodeError: 'ascii' codec can't decode byte 0x8b in position 1: ordinal not in range(128)
This issues was supposed to be fixed way back in 2018.X, but it appears to still be an issue, or at least my use case is an edge case that still causes it.
Description of Issue
I need to encrypt an entire directory, and the only way I know of to do that is to tar up the file and encrypt it using Salt's GPG key. Then add it to pillars.
The problem comes when I try to create the file on the receiving end and I get this error:
This issues was supposed to be fixed way back in 2018.X, but it appears to still be an issue, or at least my use case is an edge case that still causes it.
Setup
tar -czf ../archive.tar.gz ./
cat ../archive.tar.gz | gpg --encrypt --armor --trust-model always -r [email protected]
Obviously most of those values are sanitized.
Steps to Reproduce Issue
See above.
Versions Report
The text was updated successfully, but these errors were encountered: