Migrating Deploy SSH keys from personal repo to organisation repo

So I have a deploy script which deploys the repository to my server and the script worked well when I was running it on a personal repository.
But it failed when I tried running it on an organisation repo of which I am not an owner of,.
It keeps failing with this error:
The command "openssl aes-256-cbc -K $encrypted_......_key -iv $encrypted_......_iv -in deploy_rsa.enc -out ~\/deploy_rsa -d" failed and exited with 1 during .
How exactly should I handle this?
I tried regenerating new keys and then rewriting the script but it didn’t work.
I do have contributor access to the organisation repo, and it is authorised with GitHub Apps.

You need to change all secret values to ones encrypted with the org repo’s key.

See https://docs.travis-ci.com/user/encryption-keys/#usage and https://docs.travis-ci.com/user/environment-variables/#defining-encrypted-variables-in-travisyml.

(Can’t say anything else without seeing the build.)

Oh! Thank you, but that’s not for SSH keys, right?
For SSH keys, I’d be following something like this(??):-


Still, it doesn’t work. Not sure why, here’s the build:
https://travis-ci.com/github/Super-Serious/bot/builds/176887754

Files are decrypted during the build with the keys held in secret variables, so it’s sufficient to re-encrypt the key variables.

But in your case, the error is

Can't open ~/deploy_rsa for writing, No such file or directory

and this path in the command looks weird, why do you need a backslash there?

Oh, I’m so sorry. I didn’t notice that. Thank you!

Imprint