3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【Python】PyPIエラー対応 Invalid or non-existent authentication informationの対処法

Last updated at Posted at 2019-02-25

発生したエラー

twineを使って、PythonパッケージをPyPIに登録しようとしたところ、

HTTPError: 403 Client Error: Invalid or non-existent authentication information.

のエラーとなる。

$ twine upload --repository pypi dist/*
Enter your username: hogefuga
Enter your password: 
Uploading distributions to https://upload.pypi.org/legacy/
Uploading (yourpackagename)-1.0.0-py3-none-any.whl
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11.4k/11.4k [00:01<00:00, 9.14kB/s]
NOTE: Try --verbose to see response content.
HTTPError: 403 Client Error: Invalid or non-existent authentication information. for url: https://upload.pypi.org/legacy/
$

対処方法

usernameかpasswordが間違っているので、正しいものを入力し直してください。

$ twine upload --repository pypi dist/*
Enter your username: (正しいusername)
Enter your password: (正しいpassword)
Uploading distributions to https://upload.pypi.org/legacy/
Uploading (yourpackagename)-1.0.0-py3-none-any.whl
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11.4k/11.4k [00:01<00:00, 9.14kB/s]
$

無事、パッケージが登録されました。

環境

  • Python 3.6.6
  • twine 1.13.0
3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?