I'm trying to add automate a script that requires daily cloning of some git repo.
I basically followed what i found and tried this:
COPY id_rsa /root/.ssh/id_rsa
RUN yum install -y git
RUN eval "$(ssh-agent -s)" && \
ssh-add /root/.ssh/id_rsa && \
git clone <my repo>
Where id_rsa is basically a copy of my private key that i've put under the directory where my docker file gets run. k
However, it seems that git still won't allow me to clone:
Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)
Agent pid 13
Initialized empty Git repository in /test/.git/
Host key verification failed.
fatal: The remote end hung up unexpectedly
Any help is much appreciated. Thanks!