0

我在我的工件实例上创建了一个 alpine 远程仓库,但无法在我的 apk 客户端中安装 apk 包

当我在我的 alpine docker 中更新 apk 时,我的权限被拒绝:

例如

docker run -it alpine /bin/sh

echo "https://first.last%40mycompany.com:AKmyartifactorytoken@myserver.mycompany.com/artifactory/alpine_linux_org-remote/v3.10/main" > /etc/apk/repositories

APK更新

获取 https://first.last%40mycompany.com:AK..token@myserver.mycompany.com/artifactory/alpine_linux_org-remote/v3.10/main/x86_64/APKINDEX.tar.gz 错误:https://first .last%40mycompany.com:AK..token@myserver.mycompany.com/artifactory/alpine_linux_org-remote/v3.10/main: Permission denied WARNING: Ignoring APKINDEX.fe5b96c4.tar.gz: No such file or directory 1 错误; 提供 14 种不同的套餐

我相信问题与用户名/密码有关,因为当我不使用用户名/密码时,我会遇到同样的错误。您会注意到我正在对我的用户名进行 url 编码,将 @ 符号替换为 %40 我尝试过使用和不使用 url 编码

以下确实有效并成功下载了 APKINDEX.tar.gz:

wget https://first.last%40mycompany.com:AKmytoken@myserver.mycompany.com/artifactory/alpine_linux_org-remote/v3.10/main/x86_64/APKINDEX.tar.gz

非常感谢

4

1 回答 1

1

由于这是权限被拒绝的问题,我看到您在用户名中使用“@”并确认它正在使用 wget 命令,这是 APK 客户端的问题,因为它不理解“@”符号并失败没有权限。尝试使用没有“@”登录的用户。

于 2020-11-19T15:57:03.257 回答