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

Populate with earthaccess.login guide in User Guide Authentications docs #862

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

andypbarrett
Copy link
Collaborator

@andypbarrett andypbarrett commented Nov 1, 2024

Populated authentication page in User Guide

  • Populate a descriptive title. For example, instead of "Updated README.md", use a
    title such as "Add testing details to the contributor section of the README".
    Example PRs: #763

This resolves #853 add (hopefully) a complete guide to using earthaccess.login and auth methods.

The following are included in the page:

  • Descriptions of how to use earthaccess.login to manually login, and use netrc and environment variables.
  • Instructions to create netrc and environment variables in Linux, MacOX and Windows are included.
    • These need to be tested, especially for MacOS and Windows.
  • Instructions for authenticating different endpoints; e.g. UAT.
  • Instructions for retrieving S3 credentials

Much of this information comes from the "How do I" section. I suggest that we remove content from that section and use the "How do I..." to provide specific links to the User Guide Authentication.


📚 Documentation preview 📚: https://earthaccess--862.org.readthedocs.build/en/862/

Copy link

github-actions bot commented Nov 1, 2024

Binder 👈 Launch a binder notebook on this branch for commit 4fb4e78

I will automatically update this comment whenever this PR is modified

Binder 👈 Launch a binder notebook on this branch for commit 137c45c

Binder 👈 Launch a binder notebook on this branch for commit 078b375

Binder 👈 Launch a binder notebook on this branch for commit bb44a8e

Binder 👈 Launch a binder notebook on this branch for commit e76af26

Binder 👈 Launch a binder notebook on this branch for commit 743836d

Binder 👈 Launch a binder notebook on this branch for commit ef64b1e

Binder 👈 Launch a binder notebook on this branch for commit afe49f9

Binder 👈 Launch a binder notebook on this branch for commit ff4c717

@andypbarrett andypbarrett marked this pull request as ready for review November 1, 2024 21:44
docs/user_guide/authenticate.md Outdated Show resolved Hide resolved
docs/user_guide/authenticate.md Outdated Show resolved Hide resolved
docs/user_guide/authenticate.md Outdated Show resolved Hide resolved
docs/user_guide/authenticate.md Outdated Show resolved Hide resolved
docs/user_guide/authenticate.md Outdated Show resolved Hide resolved

Setting `strategy=interactive` will force a manual login.

## Login using a `.netrc`
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think a note here might be really useful -- we don't (yet) support encrypted netrc files, and this strategy of writing credentials in plain text to disk should not be used on untrusted machines or shared user accounts.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good suggestion. I will add an admonition

docs/user_guide/authenticate.md Outdated Show resolved Hide resolved
export EARTHDATA_USERNAME="username"
export EARTHDATA_PASSWORD="password"
```
If you want to set these environmental variables permanently, add these two lines to your `.bashrc` file.
Copy link
Collaborator

Choose a reason for hiding this comment

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

.bashrc for Linux and .profile for Mac won't always be correct. I'm not very familiar with zsh yet, but I believe it uses a .zprofile file? Bash users can permanently set envvars in .profile as well, but that will only work for "login" shells. There isn't really a one-size-fits-all answer here, it depends on the shell.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

So should we just say "add [these] to the appropriate configuration files for your operating system."

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think that makes sense as a fallback instruction; e.g.:

If you use bash and would like to set these environment variables permanently, add these two lines to your ~/.profile file: ... code ... . Otherwise, use the recommended method to persistently set environment variables for whichever shell you use.

Something like that?

docs/user_guide/authenticate.md Outdated Show resolved Hide resolved
docs/user_guide/authenticate.md Outdated Show resolved Hide resolved
andypbarrett and others added 8 commits November 4, 2024 11:24
fix typo - extra "a"

Co-authored-by: Matt Fisher <[email protected]>
Fix typo - "login" to "log in"

Co-authored-by: Matt Fisher <[email protected]>
make method summary a bulleted list with links

Co-authored-by: Matt Fisher <[email protected]>
add explanatory text

Co-authored-by: Matt Fisher <[email protected]>
Change to fixed-width

Co-authored-by: Matt Fisher <[email protected]>
Make terminology consistent

Co-authored-by: Matt Fisher <[email protected]>
Fix typo

Co-authored-by: Matt Fisher <[email protected]>
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.

[BUG] Populate user_guide/authentication
2 participants