SSL certificate problem: dockersamples/single-dev-env

I’m running Docker Engine v20.10.17 on Windows 10 and I’m trying to run the sample Single container dev environment but getting this error:

fatal: unable to access 'https://github.com/dockersamples/single-dev-env/' : SSL certificate problem: unable to get local issuer certificate

I read through all of the the other solutions for this on this forum and the web and I have been able to make the following progress:

  • downloaded the CA for github.com
  • added this CA to c:/Program Files/Git/mingw64/ssl/certs/ca_bundle
  • after doing this, curl still throws the following error as follows:

curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.

and

Docker continues to throw this error:

Preparing to clone inside a volume
Installing credential helpers... done
Cloning into '/code'...
fatal: unable to access : SSL certificate problem: unable to get local issuer certificate
exit code 128

If anyone can please help me get past this, I would really appreciate it.

Thanks

Jackster

Please, format your post next time as described in the folowing topic:

I fixed your post, because the forum changed your link and I didn’t understand the error message.

I sill don’t understand the topic title: “SSL certificate problem on Docker but not using Curl
Where did you use curl? Did you actually create a Dev Environment in Docker Desktop and cloned the above mentioned repository into that environment? I don’t see how a certificate in the mingw64 directory on your Windows would help.

Please, provide more details about what you did before you got the error message, because the repository is pretty old, although, it does not do much.

If a certificate is missing in the development environment, I would only install the “ca-certificates” package, but I doubt that would be necessary, because when you create the development environment, you can configure your Git repository and I don’t think GitHub is not supported.

Thank you for fixing my post and sorry for the confusion on my topic… I was wrong about that, curl does not work for me either going to github.com.

I don’t have any environments created yet, this is a brand new installation of Docker on Windows.
I’m just getting started and trying to learn Docker.

So far, I installed Docker on my Windows 10 desktop. I don’t have any environments created yet and I was trying to run the “Single container dev environment” and that is when I’m getting the SSL certificate error when Docket tries to pull from github.com.

Thank you for you help with this!

Jackster

Sorry for the late response. Somehow the topic was hid by the forum’s spam filter right before I wanted to send the below message and I forgot about it later, but know I found the link in my notes which I saved to be able to come back. :slight_smile:

Okay, I changed the topic title.

If you just build that sample application on your host it will just create a go binary. Let’s say you run it on Windows in your mingw shell. I don’t know if Go needs a special certificate setting somewhere, but I don’t think that repository was meant to use that way. I think it was created in an actual dev environment so first you need to create one. When you create a new dev environment on Docker Desktop, it will ask for a remote git url or a local repository path. The remote url is the recommended way and you can use the GitHub repo URL there. In the end you will have the cloned repository in the dev environment and you can connect to it from Visual Studio Code. You will have a button next to the dev environment on the UI and you can develop your app in the container as if it were on your machine.

I also use it because there are some commands that don’t work on mac and I want to use them so I do it in a dev environment.

Thanks for getting back to me on this but since my last post, I scrapped the Windows machine and installed Docker on my Mac with no issues so I’m up and running.
Thank you!
Jack