What should I assign to ECOMMERCE_GIT_IDENTITY?

I’m trying to set our git repository address in server-vars.yml file. though each value I set for ECOMMERCE_GIT_IDENTITY it ends up with the following error:

Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.

I have a private key with which I can clone the repository manually. but It seems to not work when I assign its content to ECOMMERCE_GIT_IDENTITY.
could you guide me, please?

@mahyard, if the SSH private key that you are trying to use has the access to the ecommerce repository that you want to use in your deployment, you can specify it like

  <private key contents>

Please note the usage of the Ansible block operator, |, and the indentation of all the lines of the value.

1 Like

Thank you @guruprasad
I was absolutely disappointed about having an answer.
I’ll check it out and inform everyone about the result.

It worked for me as @guruprasad explained.
Follow this link if you need more information about “Literal Block Scalar” | which we used here.