How to authenticate for index publishing¶
ユーザ名は、優先順位に従って、次のソースから取得されます。:
- The
--user
/-u
cli option. - The
HATCH_INDEX_USER
environment variable. - The
repos
tables. - The
~/.pypirc
file. - The input to an interactive prompt.
フォールバックとして、値__token__
が適用されます。
パスワードは次の場所で検索されます。:
- The
~/.pypirc
file if the username was provided by it. - The
--auth
/-a
cli option. - The
HATCH_INDEX_AUTH
environment variable. - The
repos
tables. - A variety of OS-level credentials services backed by keyring.
- The input to an interactive prompt.
対話的に提供されたクレデンシャルが使用された場合、ユーザ名はHatch's cacheに保存され、パスワードは利用可能なkeyringにバックアップされたクレデンシャルストアに保存されまる。
PyPIへの自動リリースには、"Trusted Publishing" with OIDC(例:PyPAのPyPI-publish
GitHub Action)またはプロジェクトごとのAPI tokensを使用することをお勧めする。