I have the following code in my Dockerfile:
FROM alpine/git as clone
WORKDIR /app
RUN git clone https://github.com/spring-projects/spring-petclinic.git
However, I'm getting this error:
fatal: unable to access 'https://github.com/spring-projects/spring-petclinic.git/': SSL certificate problem: self signed certificate in certificate chain
I actually have a local git and I can't disable SSL certificate.
Try and add to your Dockerfile, before the git clone
:
RUN apk add --update \
ca-certificates \
&& update-ca-certificates
From there, as commented, you can clone the repo with an HTTPS URL like:
https://username:[email protected]/project_name.git
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With