SSL/TLS configuration error

Hello everyone,

I want to tell you what I’m trying to do. I am trying to use nexus repo integrated with GitLab. My Nexus server is running and I can push the docker image from my Linux machine via the HTTP port. But when I try to do this on GitLab-CI, I get an error.

I have defined the DOCKER_REP_URL as variable on gitlab-ci as follows:
DOCKER_REP_URL=192.168.10.73:8082
This is my nexus repository server.

In my gitlab-ci.yml file, I used it like this:
`

docker-build-test:
stage: build
services:
- docker:dind
environment:
name: test
variables:
DOCKER_DRIVER: overlay
script:
- sed ‘s/APP_PROFILE/’"$APP_TEST_PROFILE"’/g’ Dockerfile_tpl > Dockerfile;
- docker build -t $DOCKER_REP_URL/$IMAGE_NAME_TEST:$CI_COMMIT_SHA .
- docker push $DOCKER_REP_URL/$IMAGE_NAME_TEST:$CI_COMMIT_SHA
- docker rmi --force $DOCKER_REP_URL/$IMAGE_NAME_TEST:$CI_COMMIT_SHA
artifacts:
expire_in: 1 hour
only:
- test `

But when I ran pipeline, I got an error like this:
$ docker push $DOCKER_REP_URL/$IMAGE_NAME_TEST:$CI_COMMIT_SHA

[567](http://gitlab.bib-web.com/nacorac/ciram.decisionsupport.microapi/-/jobs/404#L567)The push refers to repository [192.168.10.73:8082/ciram.decisionsupport.microapi-test]

[568](http://gitlab.bib-web.com/nacorac/ciram.decisionsupport.microapi/-/jobs/404#L568)Get https://192.168.10.73:8082/v2/: http: server gave HTTP response to HTTPS client

I think the error is occurring because my nexus server has no TLS / SSL configuration. That’s why I embed a certificate on my server. This certificate is not self-signed, but an in-house generated certificate. I also gave an HTTPS port (8083) to the repository I created for docker images.

After that I changed the DOCKER_REP_URL on gitlab-ci again and set it to 192.168.10.73:8083. Then I ran the pipeline and this time I got the following error:

I guess I get a connection error when it can’t find such a repository. I have to trust the certificate to solve it, so I have to add this certificate to the truststore. To do this, I tried to follow the link Configuring SSL but I got errors in the keytool process. If you want, I will share them with you. But I’m not sure if I’m going right. I don’t know what to do and I’m stuck here. Can you give me suggestions. I want to access my Nexus server via https. I added my certificate to the server, but what should I do now? I would be glad if you could help.