简体   繁体   English

包发布(Python)通过诗歌失败

[英]Package Publishing (Python) failing through Poetry

I am new to this, trying to publish a package to pypi.org using Poetry package.我对此很陌生,试图使用 Poetry 包将包发布到 pypi.org。 on my local the build is working, I am able to import the package test run it, it's all good.在我的本地构建正在运行,我能够导入包测试运行它,一切都很好。

but when I try to publish it to pypi.org, I get below error - as per the article I was following Link , it was supposed to prompt me for my pypi account ID and password, but it doesn't and then gives the error:但是当我尝试将它发布到 pypi.org 时,出现以下错误 - 根据我关注Link的文章,它应该提示我输入我的 pypi 帐户 ID 和密码,但它没有,然后给出错误:


Publishing gsst (0.2.2) to PyPI
 - Uploading gsst-0.2.2-py3-none-any.whl 0%
 - Uploading gsst-0.2.2-py3-none-any.whl 100%

and then this error shows up --然后出现这个错误——

HTTP Error 403: Invalid or non-existent authentication information. See https://pypi.org/help/#invalid-auth for more information. | b'<html>\n <head>\n  <title>403 Invalid or non-existent authentication information. See https://pypi.org/help/#invalid-auth for more information.\n \n <body>\n  <h1>403 Invalid or non-existent authentication information. See https://pypi.org/help/#invalid-auth for more information.\n  Access was denied to this resource.<br/><br/>\nInvalid or non-existent authentication information. See https://pypi.org/help/#invalid-auth for more information.\n\n\n \n'

after i run the -- poetry publish command, the CLI should prompt me for pypi, ID and password.在我运行 --poetry publish 命令后,CLI 应该提示我输入 pypi、ID 和密码。 why does it skip it and then fails on authentication.为什么它会跳过它然后在身份验证时失败。

I was able to resolve the problem finally - Took help from poetry documentation here我终于能够解决问题 - 从这里的诗歌文档中获得帮助

Issued the below command to setup my pypi.org account for auto authentication发出以下命令来设置我的 pypi.org 帐户以进行自动身份验证

poetry config http-basic.pypi <username> <password>

After that I ran the "poetry publish" command and was able to publish my package on pypi.org.之后我运行了“poetry publish”命令并能够在 pypi.org 上发布我的包。

It's really the quickest and easiest way to post your package to pypi.org这确实是将您的包裹发布到 pypi.org 的最快最简单的方法

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM