tufup hangs on windows image in aws codebuild #146
-
When setting up a CI/CD workflow on AWS Codebuild, using Powershell on the The required private keys (unencrypted) are obtained from the aws parameter store and written to disk using How to fix this? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The default shell used by the This can be verified by running If your key files are written using
However, this error is silently caught by tufup, and tufup then makes another attempt to read the private key, this time with a password prompt. One workaround is to write the key files using $null = New-Item -Force <path-to-file> -Value <content-of-private-key-file> Another option would be to call powershell core (6+) which is also available on the image, but not the default. Powershell 6+ allows us to specify |
Beta Was this translation helpful? Give feedback.
The default shell used by the
aws/codebuild/windows-base:2019-3.0
image is windows powershell, i.e. powershell version 5.This can be verified by running
$PSversionTable
and checking the logs.If your key files are written using
Out-File
in powershell 5, the default encoding for that file will be utf-8 with BOM (byte-order-mark).This raises an error when securesystemslib (<1.0) tries to read the private key file:
However, this error is silently caught by tufup, and tufup then makes another attempt to read the private key, this time with a password prompt.
The password prompt causes the build to hang, because it's waiting fo…