I just had that same issue while running git clone ...
to download source code from a private Git repository in BitBucket into a Docker image. I solved it by disabling the SSL check like so:
GIT_SSL_NO_VERIFY=1 git clone ...
Notice that there is no &&
between the Environment arg and the git clone command.
You can also set that option using git config
:
git config http.sslverify false
For my use case in building a Docker image it is easier to set the Env var.