AWS Codeartifact未指向私有存储库

问题描述

按照AWS的说明,我可以通过以下方式在Linux上对codeartifact进行身份验证

aws codeartifact登录-工具麻线-存储库pypi-mystore --domain mydomain --dom 所有人xxxxxxxxxxx

但是当尝试点安装某些软件包时,出现以下错误404客户端错误:找不到网址https://pypi.org/simple/mypackage/

它似乎指向pypi而不是我的私人仓库

任何建议将不胜感激

解决方法

成功执行login命令后,应将其详细信息写入以下配置文件。请确认是否确实发生了这种情况:

~/.config/pip/pip.conf

示例:

» cat ~/.config/pip/pip.conf
[global]
index-url = https://<TOKEN>@my-domain-123456789012.d.codeartifact.us-east-1.amazonaws.com/pypi/pypi-store/simple/
,

您可能想使用pip而不是twine作为工具。

aws codeartifact login --tool pip --repository pypi-mystore --domain mydomain --dom ain-owner xxxxxxxxxxx