Encountered a cryptographic error while encrypting the file
sfc-gh-hchaturvedi opened this issue · 1 comments
sfc-gh-hchaturvedi commented
I used the documentation to encrypt a file using secure-file utility. These were the steps I took :
- iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
- .\appveyor-tools\secure-file -encrypt C:\Users\hchaturvedi\Desktop\secure-file\file.txt -secret -out C:\Users\hchaturvedi\Documents\DotNetWork\file.txt.enc
- I created two secure_variable by sticking both the secret and the salt from step 2 into the appveyor encryption utility .
- I placed both the encrypted values in appveyor.yml and pushed it to github.
That's when I get the following error -
WARNING: You are using a hard-coded salt value! Please re-encrypt your data so a randomized salt can be generated (which you will also need to store). Encountered a cryptographic error while processing the file. Command exited with code 2
Can you please help pointing out what I might be doing wrong here?
FeodorFitsner commented
Could it be that is PR build? Secure variables are not decoded/set by default in PR builds.