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