No option to clone the repo using HTTPS

There is no option to clone the repo using HTTPS. though SSH is working fine.

Group 4

I am using dockerised gitlab-ce and gitlab-runner on an on-premises server. I have mapped git.domain.co to my public IP. I am using Caddy as a reverse proxy.

#Docker-compose-gitlab.yml

version: '3.6'
services:
  gitlab:
    image: 'gitlab/gitlab-ce:16.0.5-ce.0'
    restart: always
    container_name: 'gitlab'
    hostname: 'git.domain.co'
    expose:
      - 80
      - 443
      - 22
    volumes:
      - './gitlab_config:/etc/gitlab'
      - './gitlab_logs:/var/log/gitlab'
      - './gitlab_data:/var/opt/gitlab'
    shm_size: '3gb'  
    networks:
      - traefik_network

networks:
  traefik_network:
    external: true

Caddy Configuration
I am using a dockerised caddy as a reverse proxy. I have opened this port in my docker-compose-caddy.yml.

#docker-compose-caddy.yaml file ports
ports:
 - 80:80
 - 443:443
 - 22:22
#Caddyfile
git.domain.co {
  reverse_proxy gitlab:80
}

I want an option to clone the repo using an HTTPS URL. how can I do this?

This is controlled by external_url in gitlab.rb

@balonik by default this line is commented in gitlab.rb file. when i set external_url β€œhttps://git.domain.co” in gitlab.rb file. my gitlab server stopped working. but when I set external_url β€œhttp://git.domain.co”, gitlab-server starts working.

You can’t expect to be able to clone using HTTPS if you do not setup HTTPS. I sugegst to look back at GitLab installation guide and finish your GitLab setup.

Actually, no need to use external url https://domain.com. just need to change some configurations from gitlab UI. I just have to change the clone URL from HTTP to HTTPS.

1 Like