Consistent error when using apt on Ubuntu 20.04

Bitrise Build Issue Report template

Description of the issue

Every build fails when trying to use apt to install a package or add a ppa repo;

+ add-apt-repository --yes ppa:rpardini/adoptopenjdk
Ign:1 focal InRelease
Get:2 focal-security InRelease [114 kB]
Hit:3 focal InRelease
Err:4 focal Release
Certificate verification failed: The certificate is NOT trusted. The certificate chain uses expired certificate. Could not handshake: Error in the certificate verification. [IP: 443]
Get:5 stable InRelease [17.1 kB]
Get:6 cloud-sdk InRelease [6,739 B]
Hit:7 focal InRelease
Get:9 focal-updates InRelease [114 kB]
Hit:10 focal InRelease
Get:11 stable/main all Packages [10.5 kB]
Get:12 cloud-sdk/main i386 Packages [153 kB]
Get:13 stable/main i386 Packages [10.5 kB]
Get:14 stable/main amd64 Packages [10.5 kB]
Get:15 cloud-sdk/main amd64 Packages [190 kB]
Get:16 focal InRelease [18.1 kB]
Get:17 focal-security/restricted amd64 Packages [580 kB]
Get:8 focal InRelease [24.4 kB]
Get:18 focal-security/universe amd64 Packages [794 kB]
Get:19 focal-security/main amd64 Packages [1,133 kB]
Get:20 focal-security/main i386 Packages [358 kB]
Get:21 focal-security/universe i386 Packages [628 kB]
Get:23 focal-backports InRelease [101 kB]
Get:22 focal/main amd64 Packages [2,012 B]
Get:24 focal/main i386 Packages [1,986 B]
Get:25 focal-updates/restricted amd64 Packages [630 kB]
Get:26 focal/main amd64 Packages [11.1 kB]
Get:27 focal-updates/universe amd64 Packages [1,082 kB]
Get:28 focal-updates/universe i386 Packages [794 kB]
Get:29 focal-updates/main i386 Packages [681 kB]
Get:30 focal-updates/main amd64 Packages [1,580 kB]
Reading package lists...
E: The repository ' focal Release' no longer has a Release file.


Android / Ubuntu 20.04

Which build Step causes the issue and which version of the step?

Either the apt-get install “step”, or invoked apt in a “script” step


  • Does a “Rebuild” help? (You can trigger a rebuild from the Build’s page, by clicking the “Rebuild” button in the top right corner of a finished build) : NO
  • Does a rebuild without caches help? (You can remove the Cache:Pull and Cache:Push steps temporarily to not to use the cache, or you can delete all the caches on the Settings tab of the app. : NO
  • Does the issue happen sporadically, or every time? : Every Time
  • Does upgrading the build Step to the latest version help? : NO
  • When did the issue start? : Sep 30th

Local reproduction

Can it be reproduced on your own Mac/PC by following our local debug guide? Please follow at least the first section (“Testing with a full clean git clone”) to make sure to test the state of the code what will get when it does a git clone in the clean environment! If possible please note which sections you tried.

Local reproduction: Linux / Android (docker based) stack builds

Can it be reproduced by running the build locally, after doing a new git clone of the repository into the /tmp directory and running the build from there with the Bitrise CLI ( Bitrise CLI )? If no, can it be reproduced with Docker (using the same docker images / environment we use on Related guide: .

Build log

1 Like

Interestingly, I am able to remote into the box and run the apt command successfully. The system requires you to use sudo. I confirmed using sudo in our build script doesn’t change the failure.

The solution mentioned in this thread worked for us in the meantime until a proper solution is applied: The certificate for deb.nodesource seems to be expired · Issue #1266 · nodesource/distributions · GitHub

sudo rm /usr/share/ca-certificates/mozilla/DST_Root_CA_X3.crt
sudo update-ca-certificates

Can confirm the workaround works. But I think the proper solution is that Bitrise needs to roll an updated Ubuntu docker image with an updated ca-certificates package.

1 Like

Issue seems resolved, workaround can be removed

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.