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 to my public IP. I am using Caddy as a reverse proxy.


version: '3.6'
    image: 'gitlab/gitlab-ce:16.0.5-ce.0'
    restart: always
    container_name: 'gitlab'
    hostname: ''
      - 80
      - 443
      - 22
      - './gitlab_config:/etc/gitlab'
      - './gitlab_logs:/var/log/gitlab'
      - './gitlab_data:/var/opt/gitlab'
    shm_size: '3gb'  
      - 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
 - 80:80
 - 443:443
 - 22:22
#Caddyfile {
  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 β€œ” in gitlab.rb file. my gitlab server stopped working. but when I set external_url β€œ”, 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 just need to change some configurations from gitlab UI. I just have to change the clone URL from HTTP to HTTPS.

1 Like