Error updating GitLab CE from version 12.1.6 to the latest

Good night, I can not update mei gitlab ce.
I have version 12.1.6 and I need to upgrade to the current version and I’m not getting it.

This is the error presented.

Can you help me?

I try to install the version later than it is installed, but it has the error below:

root@localhost:~# sudo apt-get install gitlab-ce=12.1.8-ce.0 Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages will be upgraded:
gitlab-ce
1 upgraded, 0 newly installed, 0 to remove and 11 not upgraded.
193 not fully installed or removed.
Need to get 683 MB of archives.
After this operation, 95.2 kB of additional disk space will be used.
Get:1 https://packages.gitlab.com/gitlab/gitlab-ce/ubuntu bionic/main amd64 gitlab-ce amd64 12.1.8-ce.0 [683 MB]
Fetched 683 MB in 15s (45.4 MB/s)
(Reading database … 183640 files and directories currently installed.)
Preparing to unpack …/gitlab-ce_12.1.8-ce.0_amd64.deb …
Malformed configuration JSON file found at /opt/gitlab/embedded/nodes/localhost.json.
This usually happens when your last run of gitlab-ctl reconfigure didn’t complete successfully.
This file is used to check if any of the unsupported configurations are enabled,
and hence require a working reconfigure before upgrading.
Please run sudo gitlab-ctl reconfigure to fix it and try again.
dpkg: error processing archive /var/cache/apt/archives/gitlab-ce_12.1.8-ce.0_amd64.deb (–unpack):
new gitlab-ce package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/gitlab-ce_12.1.8-ce.0_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Did you do as suggested already?

Cheers,
Michael

when running sudo gitlab-ctl reconfigure the following error was presented:

There was an error running gitlab-ctl reconfigure:

letsencrypt_certificate[gitlab.otimizeit.com.br] (letsencrypt::http_authorization line 5) had an error: Acme::Client::Error::Malformed: acme_certificate[staging] (/opt/gitlab/embedded/cookbooks/cache/cookbooks/letsencrypt/resources/certificate.rb line 25) had an error: Acme::Client::Error::Malformed: Method not allowed

1 Like

Problem solved,
Include line below in gitlab.rb file:

letsencrypt [“enable”] = false

Thank you!

2 Likes

Hi,

then you’re experiencing this bug which has been fixed in the latest 12.5 and 12.6 releases. I’d recommend to plan your upgrade to 12.6 soon enough :slight_smile:

Cheers,
Michael

1 Like