Skip to content

Instantly share code, notes, and snippets.

@uyriq
Last active March 27, 2023 06:40
Show Gist options
  • Save uyriq/1180c0a2eb4bc07bbab53b0613e8b8a3 to your computer and use it in GitHub Desktop.
Save uyriq/1180c0a2eb4bc07bbab53b0613e8b8a3 to your computer and use it in GitHub Desktop.
how to fix NO_PUBKEY in ubuntu

1. ищем NO_PUBKEY

Эта команда добавляет ключ безопасности для репозитория Skype в вашу систему.

gpg --no-default-keyring --keyring skype-stable.gpg --keyserver keyserver.ubuntu.com --recv-keys 1F3045A5DF7587C3

2. экспорт в нужный для APT формат

Эта команда экспортирует ключи в нужный формат для APT.

gpg --no-default-keyring --keyring $HOME/.gnupg/skype-stable.gpg --export > ./skypeforlinux-keyring.gpg

3. копируем в удобное место

Эта команда копирует ключи в удобное место и изменяет права доступа к файлу.

sudo cp ./skypeforlinux-keyring.gpg /usr/share/keyrings/; sudo chmod 644 /usr/share/keyrings/skypeforlinux-keyring.gpg;

4. правим repo.list

вручную правим файл конфигурации APT новые ключи безопасности.

nano /etc/apt/sources.list.d/skype-stable.list

или не вручную:

echo 'deb [arch="amd64" signed-by=/usr/share/keyrings/skypeforlinux-keyring.gpg] https://repo.skype.com/deb stable main' | sudo tee -a /etc/apt/sources.list.d/skype-stable.list

архитектура может быть "all"

@uyriq
Copy link
Author

uyriq commented Mar 27, 2023

Download the GPG key for the Microsoft repository.

curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
Add this GPG key to the trusted keys in your system.
sudo install -o root -g root -m 644 microsoft.gpg /etc/apt/trusted.gpg.d/

Now, add the repository to your sources.list directory.

sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/edge stable main" > /etc/apt/sources.list.d/microsoft-edge-stable.list'
It would be good to remove the downloaded GPG key because it has already been added to the system.

sudo rm microsoft.gpg
The above-mentioned commands add the necessary repositories. Now, you just need to install Microsoft Edge using these commands:

sudo apt update && sudo apt install microsoft-edge-stable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment