使用twine 上传自己的python库时报错
twine upload dist/*
ERROR HTTPError: 403 Forbidden from https://upload.pypi.org/legacy/ Invalid or non-existent authentication information. See https://pypi.org/help/#invalid-auth for more information.
这里提供一种解决方法:
在https://pypi.org/manage/account/token/创建一个token
如果你是windows用户,在C:\Users\你的用户,linux为$HOME
在这里创建一个文件 .pypirc内容为
[distutils]
index-servers=pypi
[pypi]
repository = https://upload.pypi.org/legacy/
username = __token__
password = 这里填写刚刚复制的token
保存后再运行就没问题了
twine upload dist/*