使用 Proton VPN 进行 sudo apt update 时出现问题

使用 Proton VPN 进行 sudo apt update 时出现问题

我收到此警告/错误

  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 71EB474019940E11
Reading package lists... Done      
W: GPG error: https://repo.protonvpn.com/debian stable InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 71EB474019940E11
E: The repository 'https://repo.protonvpn.com/debian stable 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.

当我跑步时,sudo apt update 我在谷歌上搜索并试图解决它,但对我没有任何作用:(

任何帮助都将不胜感激

答案1

从另一个类似的问题中,我只是想把它放在这里供其他人参考,作为一个对我有用的正确答案:

我确实用这个修复了它:

cd /etc/apt/sources.list.d

并删除了文件夹中的所有质子文件,就我而言:

sudo rm protonvpn-stable.list
sudo rm protonvpn-stable.list.distUpgrade
sudo rm protonvpn-stable.list.save

答案2

Proton 的 GPG 密钥早已停止工作。解决此问题的最简单方法通常是从源列表中删除 ProtonVPN,然后使用以下方法重新安装 ProtonVPN他们网站上的步骤

您可以通过以下方式删除当前的 ProtonVPN 存储库:

  1. 打开“软件和更新”: 查找软件和更新
  2. 点击“其他软件”选项卡: 其他软件
  3. 找到引用 ProtonVPN 的项目并取消选中它们
  4. 按“关闭”,当询问您是否要重新加载源时,单击“重新加载”: 重新加载源

完成这些之后,您现在就可以无错误地运行更新了。

如果您想继续使用 ProtonVPN,那么您可以像这样安装:

  1. 使用以下方式卸载计算机上的当前版本ProtonVPN 的说明
  2. 下载当前版本.deb来自 ProtonVPN 网站
  3. 使用 Nautilus(或其他文件浏览器),双击该文件进行安装
  4. 打开终端
  5. 更新 apt 并再次安装应用程序:
    sudo apt update
    sudo apt install protonvpn
    

如果仍有疑问,公司建议联系

答案3

apt-key这是一个简短的脚本,可以解决基于 Ubuntu 的系统在 20.10 更新(之后和add-apt-repository弃用)后出现的情况:

curl -fsSL 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x<public-key>' | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/protonvpn-stable.gpg

其中<public-key>必须替换为错误消息中显示的 NO_PUBKEY 号码。

curl 选项的解释:

   -f, --fail
          (HTTP) Fail silently (no output at all) on server  errors.  This
          is  mostly done to better enable scripts etc to better deal with
          failed attempts. In normal cases when an HTTP  server  fails  to
          deliver  a  document,  it  returns  an  HTML document stating so
          (which often also describes why and more). This flag  will  pre‐
          vent curl from outputting that and return error 22.

          This  method is not fail-safe and there are occasions where non-
          successful response codes will slip through, especially when au‐
          thentication is involved (response codes 401 and 407).

   -L, --location
          (HTTP) If the server reports that the requested page  has  moved
          to a different location (indicated with a Location: header and a
          3XX response code), this option will make curl redo the  request
          on  the  new  place.  If used together with -i, --include or -I,
          --head, headers from all requested pages will be shown. When au‐
          thentication  is  used,  curl  only sends its credentials to the
          initial host. If a redirect takes curl to a different  host,  it
          won't  be  able to intercept the user+password. See also --loca‐
          tion-trusted on how to change this. You can limit the amount  of
          redirects to follow by using the --max-redirs option.

          When  curl follows a redirect and the request is not a plain GET
          (for example POST or PUT), it will do the following request with
          a GET if the HTTP response was 301, 302, or 303. If the response
          code was any other 3xx code, curl will re-send the following re‐
          quest using the same unmodified method.

          You  can  tell  curl to not change the non-GET request method to
          GET after a 30x response by  using  the  dedicated  options  for
          that: --post301, --post302 and --post303.

   -S, --show-error
          When used with -s, --silent, it makes curl show an error message
          if it fails.

   -s, --silent
          Silent  or  quiet  mode. Don't show progress meter or error mes‐
          sages.  Makes Curl mute. It will still output the data  you  ask
          for, potentially even to the terminal/stdout unless you redirect
          it.

这将从密钥服务器获取公钥搜索结果。您可以直接转到OpenPGP 密钥服务器在浏览器中搜索相关公钥,你就会找到它。此时,它位于:
https://keyserver.ubuntu.com/pks/lookup?search=4EDE055B645F044F&fingerprint=on&op=index

结果被输入到 gpg 中,它会在/etc/apt/trusted.gpg.d/protonvpn-stable.gpg

gpg选项说明:

   --dearmor
          Pack or unpack an arbitrary input into/from an OpenPGP ASCII ar‐
          mor.  This is a GnuPG extension to OpenPGP and  in  general  not
          very useful.

   --output file
   -o file
          Write output to file.  To write to stdout use - as the filename.

答案4

这里有一个运行来更新 apt 密钥环的简单命令:

pv=$(
    curl -s https://repo.protonvpn.com/debian/dists/stable/main/binary-all/ |
        grep -oPm1 '.*">\Kprotonvpn-stable-release_.*_all.deb'
)
curl -Ls "https://repo.protonvpn.com/debian/dists/stable/main/binary-all/$pv" > "$pv"
sudo apt install ./"$pv"

相关内容