Issue
I've got a weird situation. I create credentials using my key on wsl2 using ubuntu. when the repo is pushed to a staging server also running ubuntu, the same key cannot open the staging credentials file even though it was used to create it locally. WTF?
It also doesn't work to open the development credentials file on another laptop running macOS.
I've taken the following steps:
- In VSCode I made sure line endings were to `\n'
- For git I did:
git config --global core.autocrlf false
I haven't had this happen before to this extent, before, and it's starting to become an issue. Also, credentials created on another machine won't work on my machine, even if I never open it in anything besides vim or nano.
I also tried scping both the staging.key and staging.credentials.yml.enc files from the server and tried to edit them locally and the same thing happens.
Solution
So this was a huge mistake on my part. I had set a default key in the .profile
file and that was being used every time I created a credentials file. So if you run into an issue like the one I described check to see if you had done the same thing ages ago and forgot all about it.
Answered By - Jason Shultz Answer Checked By - Robin (WPSolving Admin)