im trying to clone a private repo from my company git server. I have added private key and config file in my Dockerfile. Public key is entered on the git server. But I get following error;
RUN mkdir -p /root/.ssh
ADD config /root/.ssh/config
ADD id_rsa /root/.ssh/id_rsa
RUN chmod 600 /root/.ssh/id_rsa
RUN chmod 755 /root/.ssh/config
RUN echo “Host XXXX\n\tStrictHostKeyChecking no\n” >> /root/.ssh/config
git clone -b xxxx ssh://xxxxxxx/xxxx.git --depth=1 && \
Cloning into ‘moodlepakete’…
Warning: Permanently added ‘[XXXX]:4444,[XXXXX]:4444’ (RSA) to the list of known hosts.
Permission denied (publickey,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exist
OpenSSH_7.2p2 Ubuntu-4ubuntu2.1, OpenSSL 1.0.2g 1 Mar 2016
debug1: Reading configuration data /root/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
Pseudo-terminal will not be allocated because stdin is not a terminal.
ssh: Could not resolve hostname ssh://xxxx/xxx.git: Name or service not known
I can not specify xx because of privacy