无法从Artifactory Debian varnish41远程存储库下载软件包

时间:2018-01-05 16:22:22

标签: debian package artifactory varnish apt-get

我已使用以下网址向Artifactory添加了debian-varnish41-remote存储库:https://packagecloud.io/varnishcache/varnish41。测试按钮说一切正常。

在客户端,我成功运行了这些命令:

sudo sh -c "echo 'deb https://<my-artifactory-server>/artifactory/debian-varnish41-remote trusty main' >> /etc/apt/sources.list" 

curl -L https://packagecloud.io/varnishcache/varnish41/gpgkey | apt-key add -

sudo apt-get update

但是sudo apt-get install varnish最终会出现HTTP 400错误(错误400是错误请求)。

$ sudo apt-get install varnish
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  varnish
0 upgraded, 1 newly installed, 3 to remove and 76 not upgraded.
Need to get 1,958 kB of archives.
After this operation, 5,921 kB of additional disk space will be used.
Do you want to continue? [Y/n]
Err https://<my-artifactory-server>/artifactory/debian-varnish41-remote/ trusty/main varnish amd64 4.1.9-1~trusty
  HttpError400
E: Failed to fetch https://<my-artifactory-server>/artifactory/debian-varnish41-remote/pool/trusty/main/v/varnish (4.1.9-1)/varnish_4.1.9-1~trusty_amd64.deb  HttpError400

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

设置绕过HEAD请求具有相同的结果。

现在,我们在尝试进行故障排除时测试了以下内容:

Artifactory是否具有限制该回购下载的权限?

尽可能降低Repo权限。我们可以从浏览器下载软件包而无需登录Artifactory。所以这似乎不是问题。

回购中的版本或包文件是否不同?

我们尝试查看Varnish和Artifactory提供的InReleasePackages文件,看看它们是否有任何不同之处。它们都是相同的。看来Artifactory只会转发远程位置的文件。

该网址实际上是否可用?

使用上述URL直接从Artifactory下载包有效:

$ wget 'https://<my-artifactory-server>/artifactory/debian-varnish41-remote/pool/trusty/main/v/varnish (4.1.9-1)/varnish_4.1.9-1~trusty_amd64.deb'
--2017-12-29 22:48:47--  https://<my-artifactory-server>/artifactory/debian-varnish41-remote/pool/trusty/main/v/varnish%20(4.1.9-1)/varnish_4.1.9-1~trusty_amd64.deb
Resolving <my-artifactory-server> (<my-artifactory-server>)... <my server IP>
Connecting to <my-artifactory-server> (<my-artifactory-server>)|<my server IP>|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1958382 (1.9M) [application/x-debian-package]
Saving to: ‘varnish_4.1.9-1~trusty_amd64.deb’

100%[============================================================================>] 1,958,382   3.32MB/s   in 0.6s

2017-12-29 22:48:48 (3.32 MB/s) - ‘varnish_4.1.9-1~trusty_amd64.deb’ saved [1958382/1958382]

该网址有空格和几个括号。这会弄乱网址吗?

查看apt-get用于下载软件包的URL似乎并不表示存在任何差异:

Artifactory的:

$ apt-get download --print-uris varnish
'https://<my-artifactory-server>/artifactory/debian-varnish41-remote/pool/trusty/main/v/varnish (4.1.9-1)/varnish_4.1.9-1~trusty_amd64.deb' varnish_4.1.9-1~trusty_amd64.deb 1958382 SHA512:1a712315ccf01a7babe17f1cf8876a1d04fba16472c00759c7d63bb3f11839e6b450dcbc4541b7d07104eba600b7a835fb8d1067280eb83ede9665192aa7bf06

$ apt-get download varnish
Err https://<my-artifactory-server>/artifactory/debian-varnish41-remote/ trusty/main varnish amd64 4.1.9-1~trusty
  HttpError400
E: Failed to fetch https://<my-artifactory-server>/artifactory/debian-varnish41-remote/pool/trusty/main/v/varnish (4.1.9-1)/varnish_4.1.9-1~trusty_amd64.deb  HttpError400

清漆:

$ apt-get download --print-uris varnish
'https://packagecloud.io/varnishcache/varnish41/ubuntu/pool/trusty/main/v/varnish (4.1.9-1)/varnish_4.1.9-1~trusty_amd64.deb' varnish_4.1.9-1~trusty_amd64.deb 1958382 SHA512:1a712315ccf01a7babe17f1cf8876a1d04fba16472c00759c7d63bb3f11839e6b450dcbc4541b7d07104eba600b7a835fb8d1067280eb83ede9665192aa7bf06

$ apt-get download varnish

$ ls
varnish_4.1.9-1~trusty_amd64.deb

最后一个小标题是我们对这个问题的主要关注。 Artifactory处理URL中的空间是否很好?

非常感谢你对此的帮助!

埃斯特

0 个答案:

没有答案