gpg: can't create '/etc/apt/keyrings/vcf-archive-keyring.gpg': Permission deniedgpg: no valid OpenPGP data found.gpg: dearmoring failed: Permission denied
VMware Cloud Foundation 9.0
The current user account does not have the necessary privileges to write files to the /etc/apt/keyrings/ directory. This directory is a system location that requires root privilege for writing.
Use "sudo tee" to complete the file writing. Use the below command.
curl -fsSL https://packages.broadcom.com/artifactory/vcfcli-debian/tools/keys/BROADCOM-PACKAGING-GPG-RSA-KEY.pub; curl -fsSL https://packages.broadcom.com/artifactory/api/security/keypair/PackagesKey/public | gpg --dearmor | sudo tee /etc/apt/keyrings/vcf-archive-keyring.gpg >/dev/null
Reason: The 'tee' command is responsible for reading the data and writing it to the system directory.