kottasのブログ

主に環境設定に関するメモを記載していきます。

GitLabのインストールでcurl: (35) エラー

はじめに

Gitlabをインストールしようと、公式のチュートリアルを進めていたのだが、

  1. Add the GitLab package repository and install the package Add the GitLab package repository. curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh | sudo bash

を実行したところ、

Installing /etc/apt/sources.list.d/gitlab_gitlab-ce.list...curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number curl is unable to connect to packagecloud.io over TLS when running: curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/config_file.list?os=Ubuntu&dist=bionic&source=script This is usually due to one of two things:

1.) Missing CA root certificates (make sure the ca-certificates package is installed) 2.) An old version of libssl. Try upgrading libssl on your system to a more recent version

と、なんかエラー出た。

about.gitlab.com

環境

Ubuntu 18.04

対策

おそらく “1.) Missing CA root certificates (make sure the ca-certificates package is installed)”が原因だとおもうので、暫定対応だが、上記のスクリプトをダウンロードし、上記のスクリプトcurlのコマンドを編集して、事なきを得た。
本当はちゃんと証明書関連の設定をすべき。

スクリプトのダウンロード。

wget https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.deb.sh

スクリプト(script.deb.sh)の137行目を以下のように編集。

curl -x [PROXY] --insecure "${apt_config_url}" > $apt_source_path

スクリプト(script.deb.sh)の実行。

sudo bash script.deb.sh 

でOK。

参考

stackoverflow.com stackoverflow.com