Answer the question
In order to leave comments, you need to log in
How to add your id_rsa to docker?
good evening!
I'm trying to slip my key into the docker container for authorization on the git, but nothing happens.
who solves the problem?
RUN mkdir -p /root/.ssh
ADD id_rsa /root/.ssh/id_rsa
RUN chmod 600 /root/.ssh/id_rsa
RUN eval `ssh-agent -s` && \
ssh-add /root/.ssh/id_rsa && \
git clone [email protected]
Host key verification failed.
fatal: The remote end hung up unexpectedly
Answer the question
In order to leave comments, you need to log in
id_rsa is something you should NEVER give to ANYONE!
You need id_rsa.pub - the public part.
The public keys on the server go into /root/.ssh/authorized_keys for root, one public key per line.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question