Hi,
I guess the upgrade process fails immediately after starting, when installer is checking existing repositories. There are two ways to fix this issue.
1. Importing missing public key.
The error message looks like
Output
GPG error: http://any.repository.org bionic InRelease:The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1234567890ABCDEF
You can use the highlighted part of the message above (this string contains key ID) to import a public key.
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 1234567890ABCDEF
You will get a bunch of lines like
Output
Executing: /tmp/apt-key-gpghome.qwe1223456/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys 1234567890ABCDEF
gpg: key 1234567890ABCDEF: public key "Any Repository" imported
gpg: Total number processed: 1
gpg: imported: 1
That means that importing of a public key finished successfully.
2. Disabling the repository.
If the first method finishes unsuccessfully, you can try to disable problematic repository by commenting it on repository list. So, here is the error message again:
Output
GPG error: http://any.repository.org bionic InRelease:The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 1234567890ABCDEF
Use the highlighted part to find a file containing the repository.
sudo grep -e "http://any.repository.org" $(find /etc/apt/ -name "*.list")
You will get something like
Output
/etc/apt/sources.list.d/any.repository.list: deb http://any.repository.org bionic main
/etc/apt/sources.list.d/any.repository.list:# deb-src http://any.repository.org bionic main
The highlighted string is a path/filename of list containing problematic repository. Open this list in your favorite text editor, and comment that repository with # sign. Save the file, exit the editor.
Let me know if it helps, please.
If you would like to find out more about secure apt, here is the link.