Skip to content

Commit 254a0d4

Browse files
committed
twine-upload: add a nudge for password auth
Closes #187.
1 parent 79739dc commit 254a0d4

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

twine-upload.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@ INPUT_VERIFY_METADATA="$(get-normalized-input 'verify-metadata')"
4040
INPUT_SKIP_EXISTING="$(get-normalized-input 'skip-existing')"
4141
INPUT_PRINT_HASH="$(get-normalized-input 'print-hash')"
4242

43+
PASSWORD_DEPRECATION_NUDGE="::warning title=Password-based uploads deprecated::\
44+
Starting in 2024, PyPI will require all users to enable Two-Factor \
45+
Authentication. This will consequently require all users to switch \
46+
to either API tokens or Trusted Publishers (preferred) for package \
47+
uploads. Read more: \
48+
https://blog.pypi.org/posts/2023-05-25-securing-pypi-with-2fa/"
49+
4350
TRUSTED_PUBLISHING_NUDGE="::warning title=Upgrade to Trusted Publishing::\
4451
Trusted Publishers allows publishing packages to PyPI from automated \
4552
environments like GitHub Actions without needing to use username/password \
@@ -69,6 +76,7 @@ else
6976
"against ${INPUT_REPOSITORY_URL}"
7077

7178
if [[ "${INPUT_REPOSITORY_URL}" =~ pypi\.org ]]; then
79+
echo "${PASSWORD_DEPRECATION_NUDGE}"
7280
echo "${TRUSTED_PUBLISHING_NUDGE}"
7381
fi
7482
fi

0 commit comments

Comments
 (0)