Tools: VS Code Installation Error on Ubuntu 26.04 (Resolute) via Terminal Fixing
The Problem: apt-key is Deprecated and Repository is Unsigned
The Solution: Manual Repository Configuration
1. Add the GPG Key When trying to install Visual Studio Code on the new Ubuntu 26.04 LTS (Resolute) using old tutorial methods, you will likely hit two roadblocks: This happens because Ubuntu now requires GPG keys (digital signatures) to be stored in standalone files within the /etc/apt/keyrings/ directory to ensure system integrity. Follow these steps to correctly configure the Microsoft GPG key and repository. Templates let you quickly answer FAQs or store snippets for re-use. Hide child comments as well For further actions, you may consider blocking this person and/or reporting abuseCommandCopy$ bash
# Download the official Microsoft key and convert it to .gpg format
-weight: 500;">wget -qO- [https://packages.microsoft.com/keys/microsoft.asc](https://packages.microsoft.com/keys/microsoft.asc) | gpg --dearmor > packages.microsoft.gpg # Move the key to the system's secure keyring folder
-weight: 600;">sudo -weight: 500;">install -D -o root -g root -m 644 packages.microsoft.gpg /etc/-weight: 500;">apt/keyrings/packages.microsoft.gpg # Remove the temporary file
rm -f packages.microsoft.gpg
bash
# Download the official Microsoft key and convert it to .gpg format
-weight: 500;">wget -qO- [https://packages.microsoft.com/keys/microsoft.asc](https://packages.microsoft.com/keys/microsoft.asc) | gpg --dearmor > packages.microsoft.gpg # Move the key to the system's secure keyring folder
-weight: 600;">sudo -weight: 500;">install -D -o root -g root -m 644 packages.microsoft.gpg /etc/-weight: 500;">apt/keyrings/packages.microsoft.gpg # Remove the temporary file
rm -f packages.microsoft.gpg
bash
# Download the official Microsoft key and convert it to .gpg format
-weight: 500;">wget -qO- [https://packages.microsoft.com/keys/microsoft.asc](https://packages.microsoft.com/keys/microsoft.asc) | gpg --dearmor > packages.microsoft.gpg # Move the key to the system's secure keyring folder
-weight: 600;">sudo -weight: 500;">install -D -o root -g root -m 644 packages.microsoft.gpg /etc/-weight: 500;">apt/keyrings/packages.microsoft.gpg # Remove the temporary file
rm -f packages.microsoft.gpg - -weight: 600;">sudo: '-weight: 500;">apt-key': command not found (The tool has been removed for security reasons).
- The following signatures couldn't be verified... NO_PUBKEY EB3E94ADBE1229CF (Public key error).
$ bash
# Download the official Microsoft key and convert it to .gpg format
-weight: 500;">wget -qO- [https://packages.microsoft.com/keys/microsoft.asc](https://packages.microsoft.com/keys/microsoft.asc) | gpg --dearmor > packages.microsoft.gpg # Move the key to the system's secure keyring folder
-weight: 600;">sudo -weight: 500;">install -D -o root -g root -m 644 packages.microsoft.gpg /etc/-weight: 500;">apt/keyrings/packages.microsoft.gpg # Remove the temporary file
rm -f packages.microsoft.gpg
bash
# Download the official Microsoft key and convert it to .gpg format
-weight: 500;">wget -qO- [https://packages.microsoft.com/keys/microsoft.asc](https://packages.microsoft.com/keys/microsoft.asc) | gpg --dearmor > packages.microsoft.gpg # Move the key to the system's secure keyring folder
-weight: 600;">sudo -weight: 500;">install -D -o root -g root -m 644 packages.microsoft.gpg /etc/-weight: 500;">apt/keyrings/packages.microsoft.gpg # Remove the temporary file
rm -f packages.microsoft.gpg
bash
# Download the official Microsoft key and convert it to .gpg format
-weight: 500;">wget -qO- [https://packages.microsoft.com/keys/microsoft.asc](https://packages.microsoft.com/keys/microsoft.asc) | gpg --dearmor > packages.microsoft.gpg # Move the key to the system's secure keyring folder
-weight: 600;">sudo -weight: 500;">install -D -o root -g root -m 644 packages.microsoft.gpg /etc/-weight: 500;">apt/keyrings/packages.microsoft.gpg # Remove the temporary file
rm -f packages.microsoft.gpg - -weight: 600;">sudo: '-weight: 500;">apt-key': command not found (The tool has been removed for security reasons).
- The following signatures couldn't be verified... NO_PUBKEY EB3E94ADBE1229CF (Public key error).