"Unauthenticated packages" error when trying to install dotnet-runtime-2.2 package

We use the .NET Core 3.0 SDK for building most of our project, but our tests actually run on netcoreapp2.2 since it works with Visual Studio 2017 and we haven’t needed anything newer.

In order to make this work in Travis-CI, we use dotnet: 3.0 in our YAML, with a before_install step that installs the dotnet-runtime-2.2 package. This has worked for a long time.

We just recently ran into a failure in our before_install step, complaining that the following dependencies could not be authenticated: liburcu4, liblttng-ust-ctl2, and liblttng-ust0.

I hesitate to add --allow-unauthenticated to our before_install step, since I worry that this could be a sign that something’s wrong with those packages. Any advice?

Last success that worked this way: https://travis-ci.org/NetTopologySuite/NetTopologySuite/builds/626071321

First failure: https://travis-ci.org/NetTopologySuite/NetTopologySuite/builds/627705291

FYI, the boilerplate at the top of all our build logs says to post here and cc @ three people, but only one of them seems to resolve in the preview window, and I get an error message when trying to @ all three, so:

cc @joshua-anderson @akoeplinger @\nterry

Seems to be resolved now.

First success after the last failure: https://travis-ci.org/NetTopologySuite/NetTopologySuite/builds/627705291

I don’t see any errors that you refer to in the logs you supplied. Neither does looking at the project’s build list show any streaks of failures.

Oh how horrible, apparently clicking “restart build” discards the entire failed build, instead of creating a new one and changing “build #804” to point to that new one. I just wanted to get rid of the red “X” on the GitHub commit’s status…

The original error looked like this:

$ sudo apt-get install -y dotnet-runtime-2.2
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  dotnet-hostfxr-2.2 dotnet-runtime-deps-2.2 liblttng-ust-ctl2 liblttng-ust0
  liburcu4
The following NEW packages will be installed:
  dotnet-hostfxr-2.2 dotnet-runtime-2.2 dotnet-runtime-deps-2.2
  liblttng-ust-ctl2 liblttng-ust0 liburcu4
0 upgraded, 6 newly installed, 0 to remove and 264 not upgraded.
Need to get 21.1 MB of archives.
After this operation, 71.9 MB of additional disk space will be used.
WARNING: The following packages cannot be authenticated!
  liburcu4 liblttng-ust-ctl2 liblttng-ust0
E: There were unauthenticated packages and -y was used without --allow-unauthenticated

https://askubuntu.com/questions/75565/why-am-i-getting-authentication-errors-for-packages-from-an-ubuntu-repository says that this happens if you don’t have keys corresponding to those packages. It suggests running sudo apt-key update && sudo apt-get update before installing.

Since Travis logic doesn’t run sudo apt-key update but runs sudo apt-get update and the problem went away, it looks like there was indeed a problem with those packages – e.g. new versions were pushed that weren’t signed with an appropriate key.