I am using AWS ec2 instance as private git repository. This instance is also used for running Dockerfile and docker file tries to checkout code from this private repository. My basic setup is done as per https://alvinabad.wordpress.com/2013/03/23/how-to-specify-an-ssh-key-file-with-the-git-command/ option 2. However, when i am running my docker build command:
$ sudo docker build -t "spring-petclinic" .
The build script stops at line:
RUN /root/.ssh/git.sh -i /root/.ssh/.pem clone [email protected]:/usr/local/git-repos/spring-petclinic.git
and gets following error:
"Cloning into 'spring-petclinic'... Host key verification failed. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists."
I have search through google for this type of error, on similar kind of setup, but unable to search for.
Please help!!!
Thanks