Erro GPG quando quero atualizar o apt

Erro GPG quando quero atualizar o apt

Acabei de instalar o Kali NetHunter e estou tentando fazer uma coisa simples apt updatemas parece que falta uma chave pública

root@kali:~# apt-get update
 0% [Waiting for headers] [Connected to packages.microsoft.com (13.8Get:2 https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch InRelease [3232 B]
 Hit:1 http://kali.download/kali kali-rolling InRelease
 Err:2 https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch InRelease
   The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
 Reading package lists... Done
 W: GPG error: https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY EB3E94ADBE1229CF
 E: The repository 'https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch InRelease' is not signed.
 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.

tentei

curl -s https://packages.microsoft.com/repos/microsoft-debian-stretch-prod/dists/stretch/Release.gpg | apt-key add -

e

wget --no-check-certificate https://packages.microsoft.com/repos/microsoft-debian-stretch-prod/dists/stretch/Release.gpg | apt-key add -

E o resultado foi gpg: no valid OpenPGP data foundpara ambos

Responder1

carregue a chave da microsoft

curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -

Responder2

A solução alternativa que encontrei é excluir /etc/apt/sources.list.d/microsoft.liste garantir que o repositório kali esteja descomentado e dentro do arquivo principal/etc/apt/sources.list

Responder3

  1. cd /etc/apt/sources.list.d
  2. ls(mostrou microsoft.sources.list.d)
  3. cd
  4. rm /etc/apt/sources.list.d/microsoft.sources.list.d

Agora removeu a mensagem ao tentar atualizar; no entanto, não sei se fiz isso corretamente, pois sou novo nisso.

Responder4

Para raspberrypi é quase a mesma coisa, foi apenas comentado o arquivo fonte e executado apt updatenovamente.

# cat /etc/apt/sources.list.d/vscode.list
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
# deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code stable main

informação relacionada