I have this problem too.
I put:-
deb http:/ppa.launchpad.net/opencpn/opencpn/ubuntu bionic main
at the end of sources.list
I found dirmgr was not an option.
Apt-key seemed to
work:-
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C865EB40
Executing: /tmp/apt-key-gpghome.7BuTZhja30/gpg.1.sh --keyserver keyserver.ubuntu.com --recv-keys C865EB40
gpg: key 67E4A52AC865EB40: public key "Launchpad PPA for OpenCPN" imported
gpg: Total number processed: 1
gpg: imported: 1
Update got this result:-
$ sudo apt-get update
Ign:1 http:/ppa.launchpad.net/opencpn/opencpn/ubuntu bionic InRelease m i
Err:2 http:/ppa.launchpad.net/opencpn/opencpn/ubuntu bionic Release
Undetermined Error
Hit:3
Index of /debian buster InRelease
Hit:4
Index of /raspbian buster InRelease
Reading package lists... Done
E: The repository 'http:/ppa.launchpad.net/opencpn/opencpn/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
Any help would be appreciated.
Regards
Dick