Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Encountered a cryptographic error while encrypting the file #11

Open
sfc-gh-hchaturvedi opened this issue Oct 28, 2020 · 1 comment
Open

Comments

@sfc-gh-hchaturvedi
Copy link

sfc-gh-hchaturvedi commented Oct 28, 2020

I used the documentation to encrypt a file using secure-file utility. These were the steps I took :

  1. iex ((New-Object Net.WebClient).DownloadString('https://raw.githubusercontent.com/appveyor/secure-file/master/install.ps1'))
  2. .\appveyor-tools\secure-file -encrypt C:\Users\hchaturvedi\Desktop\secure-file\file.txt -secret -out C:\Users\hchaturvedi\Documents\DotNetWork\file.txt.enc
  3. I created two secure_variable by sticking both the secret and the salt from step 2 into the appveyor encryption utility .
  4. 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
Copy link
Member

Could it be that is PR build? Secure variables are not decoded/set by default in PR builds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants