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. Yuri
(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: --currently-running release 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: Author: emaste Date: Thu Jan 17 21:38:58 UTC 2019 New revision: 343122 URL: https://svnweb.freebsd.org/changeset/base/343122 Log: freebsd-update: Clarify unsupported release upgrade error message Notify users that upgrading from -CURRENT or -STABLE is unsupported by freebsd-update. Also ensure --currently-running provides a correctly formatted release (as done by -r). PR: 234771 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 Changes: head/usr.sbin/freebsd-update/freebsd-update.sh
A commit references this bug: Author: emaste Date: Mon Jan 21 18:41:57 UTC 2019 New revision: 343268 URL: https://svnweb.freebsd.org/changeset/base/343268 Log: frebsd-update: fix --currently-running after r343122 PR: 234771 Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com> Reported by: Brandon Schneider MFC with: r343122 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18896 Changes: head/usr.sbin/freebsd-update/freebsd-update.sh
A commit references this bug: Author: emaste Date: Mon Jan 21 19:21:11 UTC 2019 New revision: 343271 URL: https://svnweb.freebsd.org/changeset/base/343271 Log: freebsd-update: Allow upgrade from pre-release builds Update r343122 to include -ALPHA, -BETA and -RC releases as upgrade-able via freebsd-update. PR: 234771 Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com> Reported by: delphij, des Reviewed by: delphij MFC with: r343122 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18881 Changes: head/usr.sbin/freebsd-update/freebsd-update.sh
A commit references this bug: Author: emaste Date: Thu Jan 24 18:48:16 UTC 2019 New revision: 343410 URL: https://svnweb.freebsd.org/changeset/base/343410 Log: freebsd-update: fix style from r343271 change PR: 234771 Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com> MFC with: r343271 Sponsored by: The FreeBSD Foundation Changes: head/usr.sbin/freebsd-update/freebsd-update.sh
A commit references this bug: Author: emaste Date: Tue Mar 5 19:01:58 UTC 2019 New revision: 344814 URL: https://svnweb.freebsd.org/changeset/base/344814 Log: MFC freebsd-update: Clarify unsupported release upgrade error message MFC r343122: freebsd-update: Clarify unsupported release upgrade error message Notify users that upgrading from -CURRENT or -STABLE is unsupported by freebsd-update. Also ensure --currently-running provides a correctly formatted release (as done by -r). Reported by: yuri Reviewed by: bcran MFC r343268: frebsd-update: fix --currently-running after r343122 Reported by: Brandon Schneider MFC rr343271: freebsd-update: Allow upgrade from pre-release builds Update r343122 to include -ALPHA, -BETA and -RC releases as upgrade-able via freebsd-update. Reported by: delphij, des Reviewed by: delphij PR: 234771 Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com> Sponsored by: The FreeBSD Foundation Changes: _U stable/12/ stable/12/usr.sbin/freebsd-update/freebsd-update.sh
A commit references this bug: Author: emaste Date: Tue Mar 5 19:07:46 UTC 2019 New revision: 344815 URL: https://svnweb.freebsd.org/changeset/base/344815 Log: MFC freebsd-update: Clarify unsupported release upgrade error message MFC r343122: freebsd-update: Clarify unsupported release upgrade error message Notify users that upgrading from -CURRENT or -STABLE is unsupported by freebsd-update. Also ensure --currently-running provides a correctly formatted release (as done by -r). Reported by: yuri Reviewed by: bcran MFC r343268: frebsd-update: fix --currently-running after r343122 Reported by: Brandon Schneider MFC r343271: freebsd-update: Allow upgrade from pre-release builds Update r343122 to include -ALPHA, -BETA and -RC releases as upgrade-able via freebsd-update. Reported by: delphij, des Reviewed by: delphij MFC r343410: freebsd-update: fix style from r343271 change PR: 234771 Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com> Sponsored by: The FreeBSD Foundation Changes: _U stable/11/ stable/11/usr.sbin/freebsd-update/freebsd-update.sh
A commit references this bug: Author: emaste Date: Tue Mar 5 19:08:38 UTC 2019 New revision: 344816 URL: https://svnweb.freebsd.org/changeset/base/344816 Log: MFC r343410: freebsd-update: fix style from r343271 change PR: 234771 Submitted by: Gerald Aryeetey <aryeeteygerald_rogers.com> Sponsored by: The FreeBSD Foundation Changes: _U stable/12/ stable/12/usr.sbin/freebsd-update/freebsd-update.sh