最小工作示例:https://gitlab.com/hynek.blaha/debug-docker-poetry/-/tree/master
\n我一直在使用 Poetry 和来自内部 PyPI 注册表的 Python 包构建 Docker 镜像。由于我们的项目位于私有 GitLab 存储库中,并且内部包不是绝密的,因此我们将诗歌凭证直接存储在pyproject.toml.
2022 年 8 月 24 日,我们所有的 Docker 构建在安装内部包时开始失败:
\n\xe2\x80\xa2 Installing til-bigquery (0.3.4)\n\n HTTPError\n\n 401 Client Error: Unauthorized for url: https://gitlab.com/api/v4/projects/38869805/packages/pypi/files/7a4731d831d4b37262481002271e359f96017570e9480ef16c89489e0b41252f/til_bigquery-0.3.4-py3-none-any.whl#sha256=7a4731d831d4b37262481002271e359f96017570e9480ef16c89489e0b41252f\n\n at /usr/local/lib/python3.9/site-packages/requests/models.py:1021 in raise_for_status\n 1017\xe2\x94\x82 f"{self.status_code} Server Error: {reason} for url: {self.url}"\n 1018\xe2\x94\x82 )\n 1019\xe2\x94\x82 \n 1020\xe2\x94\x82 if http_error_msg:\n \xe2\x86\x92 1021\xe2\x94\x82 raise HTTPError(http_error_msg, response=self)\n 1022\xe2\x94\x82 \n 1023\xe2\x94\x82 def close(self):\n 1024\xe2\x94\x82 \n 1025\xe2\x94\x82 called the underlying ``raw`` object must not …Run Code Online (Sandbox Code Playgroud)