Originally published byDev.to
The Problem: apt-key is Deprecated and Repository is Unsigned
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:
-
sudo: '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).
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.
The Solution: Manual Repository Configuration
Follow these steps to correctly configure the Microsoft GPG key and repository.
1. Add the GPG Key
bash
# Download the official Microsoft key and convert it to .gpg format
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
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
# Remove the temporary file
rm -f packages.microsoft.gpg
🇺🇸
More news from United StatesUnited States
NORTH AMERICA
Related News
How Braze’s CTO is rethinking engineering for the agentic area
10h ago
Amazon Employees Are 'Tokenmaxxing' Due To Pressure To Use AI Tools
21h ago

Implementing Multicloud Data Sharding with Hexagonal Storage Adapters
15h ago

DeepMind’s CEO Says AGI May Be ~4 Years Away. The Last Three Missing Pieces Are Not What Most People Think.
15h ago

CCSnapshot - A Claude Code Configs Transfer Tool
21h ago