Wrong SSH clone URL provided by GitLab

Created on 5 April 2023, over 1 year ago
Updated 15 May 2023, over 1 year ago

Problem/Motivation

I went looking for the repository clone URL to make modifications to a module I maintain and noticed that I could not clone via SSH using the URL provided by GitLab.

GitLab is providing git@git.drupalcode.org:project/audiorecorder.git as the SSH clone URL whereas the SSH clone URL which works is git@git.drupal.org:project/audiorecorder.git.

The HTTPS clone URL provided by GitLab (https://git.drupalcode.org/project/audiorecorder.git) does work, but only for anonymous downloads.

Here's a screenshot showing the wrong SSH clone URL being displayed:

Steps to reproduce

  1. Go to the Gitlab space for a contrib project, e.g. audiorecorder
  2. Click on the "Clone" button
  3. Examine the "Clone with SSH" field and note that git.drupalcode.org is the hostname
  4. Try running git clone with that URL and receive SSH connection failures:
    $ git clone git@git.drupalcode.org:project/audiorecorder.git
    Cloning into 'audiorecorder'...
    
    ssh: connect to host git.drupalcode.org port 22: Operation timed out
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.

Proposed resolution

Configure GitLab to report the correct hostname for SSH clones.

๐Ÿ› Bug report
Status

Fixed

Component

GitLab

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States adamfranco

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024