Here is the log:
# freebsd-update -r 11.2-CURRENT upgrade
Fetching public key from update2.freebsd.org... failed.
Fetching public key from update1.freebsd.org... failed.
Fetching public key from update4.freebsd.org... failed.
No mirrors remaining, giving up.
# uname -a
FreeBSD hp 11.1-STABLE FreeBSD 11.1-STABLE #1 r326681M: Thu Dec 7 22:18:45 PST 2017 xx@hp:/usr/obj/usr/src/sys/GENERIC amd64
The same failure occurs with
# freebsd-update -r 12.0-RELEASE upgrade
My understanding is that you can't upgrade from a -STABLE (or -CURRENT) with freebsd-update. You should either upgrade by source, or update your system to a releng/ or release/ version via source, then use freebsd-update.
An alternative would be to extract base.txz/kernel.txz from a release iso and overwrite your system with the contents (except etc/ needs to be merged).
(In reply to Xin LI from comment #2)
Hmm, it should at least say that it can't upgrade from a -STABLE (or -CURRENT). The error above looks more like an internal failure.
Upgrading base in FreeBSD is for the most part rewriting files. It's also strange that it expects some specific versions that it can upgrade, and can't upgrade arbitrary versions.
(In reply to Yuri Victorovich from comment #3)
One can also use --currently-running <release>, which is a new command line frontend for the previously environment-based variable (UNAME_r) override used to 'fake' the current versions. From man freebsd-update:
Do not detect the currently-running release; instead,
assume that the system is running the specified release.
This is most likely to be useful when upgrading jails.
This issue ("fetching key ... failed") is a frequently asked question/reported issue. It would be great to improve the error/messaging and user experience for these cases.
Subject was "freebsd-update(8) fails on 11.1-STABLE: fetching public key fails", updated to reflect that this is a general issue.
(In reply to Kubilay Kocak from comment #4)
> --currently-running release
> -- Update as if currently running this release
Further issues - this command does not indicate the required format of the "release" string or validate the provided release, so the same opaque error is emitted if the user specifies e.g. "11.2" instead of "11.2-RELEASE".
A commit references this bug:
Date: Thu Jan 17 21:38:58 UTC 2019
New revision: 343122
freebsd-update: Clarify unsupported release upgrade error message
Notify users that upgrading from -CURRENT or -STABLE is unsupported by
Also ensure --currently-running provides a correctly formatted release
(as done by -r).
Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com>
Reported by: yuri
Reviewed by: bcran
MFC after: 1 month
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D18803