Skip to content

Authenticate with Earthdata Login stored in a .netrc

Important

You will need a NASA Earthdata Login account to download or stream NASA Earthdata. To obtain a NASA Earthdata Login account , please follow the instructions at NASA EDL

Once you have a NASA Earthdata Login account you will need to create a .netrc. Instructions for creating a .netrc are here.

Once you have created a .netrc you can authenticate using earthaccess.login:

import earthaccess

auth = earthaccess.login()

Or if you want to specify a login strategy explicitly:

auth = earthaccess.login(strategy="netrc")

See the Authentication explanation page for more details.