gitlab-migration icon indicating copy to clipboard operation
gitlab-migration copied to clipboard

Update details on runtime environment

Open brain-slug opened this issue 4 years ago • 1 comments

Hi,

I tried to get it running using a Docker image based on ubuntu:20.04

FROM ubuntu:20.04

ENV SOURCE_GITLAB=git.mycompany.com
ENV TARGET_GITLAB=gitlab.com

RUN adduser migration

RUN apt-get update && \
    apt-get install git jq curl vim -y

COPY resources/migrate.sh /home/migration/
COPY resources/.secrets /home/migration/

RUN chown migration:migration /home/migration/migrate.sh && chmod +x /home/migration/migrate.sh
RUN chown migration:migration /home/migration/.secrets

USER migration

I verified .secrets file is read correctly (after fixing EOL issues) adding echo.

Still I am seeing multiple curl errors like curl: (3) URL using bad/illegal format or missing URL.

  • Source GitLab Version: GitLab Enterprise Edition 14.3.1-ee
  • Target gitlab.com
  • curl --version curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3 Release-Date: 2020-01-08
  • jq --version jq-1.6
  • bash --versionGNU bash, version 5.0.17(1)-release (x86_64-pc-linux-gnu)

Fun fact if I add CURL_PARAMS="-v"to migrate.sh it works... Could you please share runtime specific settings (bash_profile/locale/encoding etc) which have proofed to be working?

brain-slug avatar Oct 08 '21 10:10 brain-slug

Curious about the fact it worked using CURL_PARAMS="-v" I started playing with locale settings...

After some more debugging I found setting CURL_PARAMS="--raw" fixes the issue for me.

From curl man-pages

       --raw  (HTTP) When used, it disables all internal HTTP decoding
              of content or transfer encodings and instead makes them
              passed on unaltered, raw.

              Added in 7.16.2.

brain-slug avatar Oct 08 '21 12:10 brain-slug