![使用 reposync 启用 gpgcheck 后,Microsoft 公共存储库 rpm 下载失败](https://linux22.com/image/215879/%E4%BD%BF%E7%94%A8%20reposync%20%E5%90%AF%E7%94%A8%20gpgcheck%20%E5%90%8E%EF%BC%8CMicrosoft%20%E5%85%AC%E5%85%B1%E5%AD%98%E5%82%A8%E5%BA%93%20rpm%20%E4%B8%8B%E8%BD%BD%E5%A4%B1%E8%B4%A5.png)
我在使用 gpgcheck=1 从 Microsoft 公共存储库站点下载补丁 (rpm) 时遇到问题。
存储库站点:https://packages.microsoft.com/rhel/7/prod/ 要下载所有 rpm,我已按照步骤将存储库导入到我的服务器中,并在 yum repo.sd 目录中添加了相同的配置。
[packages-microsoft-com-prod]
name=packages-microsoft-com-prod
baseurl=https://packages.microsoft.com/rhel/7/prod/
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
在此路径上有 2 个 .asc 格式的密钥“packages.microsoft.com/keys”。
使用
reposync -g -p //appl/data/Patch/test/test_microsoft --download-metadata --repoid=packages-microsoft-com-prod
尝试下载所有 rpm,但我发现有些 rpm 由于缺少密钥而不断失败。
blobfuse-1.0.1-RC-preview-rhel74.rpm due to failed signature check.
testrpm-1.0.x86_64.rpm due to failed signature check.
hellomicrosoft-1.0-1.0.x86_64.rpm due to failed signature check.
libmsquic-2.0.2-1.x86_64.rpm, due to missing GPG key.
microsoft-r-client-mlm-3.5.2.rpm due to failed signature check.
microsoft-r-client-packages-3.5.2.rpm due to failed signature check.
mssql-cli-0.11.0-1.el7.x86_64.rpm due to failed signature check.
mssql-cli-0.12.0-1.el7.x86_64.rpm due to failed signature check.
mssql-cli-0.13.0-1.el7.x86_64.rpm due to failed signature check.
powershell-preview-7.1.0_preview.4-1.rhel.7.x86_64.rpm due to failed signature check
以下命令显示有少数带有 KEY 但没有签名的 rpm:
# rpm -K blobfuse-1.0.1-RC-preview-rhel74.rpm
blobfuse-1.0.1-RC-preview-rhel74.rpm: sha1 md5 OK
# rpm -K mssql-cli-0.11.0-1.el7.x86_64.rpm
mssql-cli-0.11.0-1.el7.x86_64.rpm: sha1 md5 OK
[手动转录自这个截图]。
正在寻找解决这个问题的方法。