0

I am using a self-hosted gitlab server under the url gitlab.poulina.com which I configured to a local IP address in my /etc/hosts file

192.168.1.23 gitlab.poulina.com gitlab

However, when I run my pipeline I get a redirection error

Fetching changes with git depth set to 20... Reinitialized existing Git repository in /builds/root/hello-world1/.git/ fatal: unable to update url base from redirection: asked for: http://gitlab-ci-token:[MASKED]@gitlab.poulina.com/root/hello-world1.git/info/refs?service=git-upload-pack redirect: https://gitlab-ci-token:[MASKED]@www.godaddy.com:443/forsale/poulina.com?utm_source=TDFS_BINNS&utm_medium=BINNS&utm_campaign=TDFS_BINNS&traffic_type=TDFS_BINNS&traffic_id=binns&service=git-upload-pack

This is the pipeline I created for testing


stages:
  - analyse
  - test
  - build 
  - deploy

variables:
  # 1) Name of directory where restore and build objects are stored.
  OBJECTS_DIRECTORY: 'obj'
  # 2) Name of directory used for keeping restored dependencies.
  NUGET_PACKAGES_DIRECTORY: '.nuget'
  # 3) A relative path to the source code from project repository root.
  # NOTE: Please edit this path so it matches the structure of your project!
  SOURCE_CODE_PATH: '*/*/'




before_script:
  - 'dotnet restore --packages $NUGET_PACKAGES_DIRECTORY'

build:
  stage: build

  script:
    - echo 'build'


tests:
  stage: test

  script:
    - echo 'test'

EDIT: I created a new gitlab-runner like this

  --non-interactive \
  --url "http://gitlab.poulina.com/" \
  --registration-token "TOKEN" \
  --executor "docker" \
  --docker-image ubuntu:16.04 \
  --description "docker-runner" \
  --tag-list "docker,aws" \
  --run-untagged \
  --docker-extra-hosts "gitlab.poulina.com:192.168.1.23" \
  --docker-privileged 

and although I got a new error

fatal: unable to access 'http://gitlab.poulina.com/root/hello-world1.git/': Failed to connect to gitlab.poulina.com port 80 after 131169 ms: Operation timed out

The redirect error is gone

EDIT 2 : The connection timeout was fixed by using ufw allow 80

  • 1
    Probable duplicate of https://stackoverflow.com/q/53886426/1256452 and/or https://stackoverflow.com/q/60881416/1256452 – torek Apr 25 '22 at 23:57
  • Hi, I looked at those two topics, they aren't trying to clone in a pipeline, rather from a terminal, and what I want is that the cloning to happen when I run the pipeline – Mohamed Taieb Selim Oueslati Apr 26 '22 at 00:41
  • 1
    It's the same issue though: your web server is delivering a redirect that Git refuses to follow. – torek Apr 26 '22 at 02:20

1 Answers1

0

You need to purchase the poulina.com domain, and then add an A/AAAA DNS record to point to the IP of your GitLab instance.

The following redirect is happening because you do not own the poulina.com domain: redirect: https://gitlab-ci-token:[MASKED]@www.godaddy.com:443/forsale/poulina.com

Richard
  • 2,226
  • 2
  • 19
  • 35