Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: enhance existing authentication docs #1780

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

lwasser
Copy link
Contributor

@lwasser lwasser commented Nov 6, 2024

closes #821

This is a small update to the authentication page. it adds

✅ subheadings for easier skimming
✅ a breakout on 2FA as requested in #821
✅ a bit of clarification throughout.

I have two significant questions.

  1. like others mentioned in that 821 i found that even with my username stores in the toml file, hatch still asked for it.
  2. The order of precedence for username vs password is different in this file. I didn't touch this but i wonder if that is actually the case?

IN other words, if i just enter credentials manually using -u and-auth will hatch still try to override with the .pypirc file if it finds it? i'm now convinced that order is actually correct but i also haven't dug into the code yet.

@lwasser lwasser changed the title fix: authentication docs fix: enhance existing authentication docs Nov 6, 2024

1. The `--user` / `-u` cli option.
1. a username (e.g. `__token__` for PyPI)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
1. a username (e.g. `__token__` for PyPI)
1. a username (e.g. `__token__` for PyPI to select two-factor authentication aka. 2FA)


1. The `--user` / `-u` cli option.
1. a username (e.g. `__token__` for PyPI)
2. a token value or other form of trusted authentication from the index (PyPI)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
2. a token value or other form of trusted authentication from the index (PyPI)
2. a password, token value or other form of trusted authentication for the package index

@@ -2,17 +2,32 @@

----

The username is derived from the following sources, in order of precedence:
To publish to an index such as PyPI or TestPyPI you need two things:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
To publish to an index such as PyPI or TestPyPI you need two things:
To publish to a package index such as PyPI or TestPyPI you need two things:

@pitrou
Copy link

pitrou commented Nov 8, 2024

Hi @lwasser , I just posted a couple of comments in the hope of making the help more explicit and easier to understand. Feel free to approve these changes or not :)

@@ -62,6 +62,7 @@ dependencies = [
"pymdown-extensions~=10.8.1",
# Necessary for syntax highlighting in code blocks
"pygments~=2.18.0",
"griffe<1.0",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(how) is this related to the proposed prose changes?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @funkyfuture i mentioned this to @ofek right now the docs won't build without this change in the hatch doc environment. I read it's a known issue. I think ofek wants to make the change separately / rebuild the environment. But if anyone wants to pull this down and build they will have issues without this change (or atleast that is what i discovered).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Docs: publishing > authentication > API tokens
3 participants