Page 1 of 1

Error authenticating to NASA EarthData for downloading ancillary data

Posted: Tue Oct 12, 2021 5:53 am
by ruochen11
Hello everyone
i try to process sentinel use polymer_cli.py
the error is:
in download
assert not fp.read(100).startswith(b'<!DOCTYPE html>'), errormsg
AssertionError: Error authenticating to NASA EarthData for downloading ancillary data. Please provide authentication through .netrc. See more information on https://support.earthdata.nasa.gov/inde ... l-and-wget


Appreciate the help.

Thank you,
ruochen

Re: Error authenticating to NASA EarthData for downloading ancillary data

Posted: Tue Oct 12, 2021 1:55 pm
by yonisherman
Looks like you don't have a .netrc file setup.
See this link from NASA's ocean color web website with instructions https://oceancolor.gsfc.nasa.gov/data/d ... wnload_sec

Here is the relvent section from the page:

Create a .netrc file.
RECOMMENDED METHOD: Configure your username and password for authentication using a .netrc file. If you experience errors or redirects when using a cookie file, delete any existing cookie files and generate a new one for your current session.

echo "machine urs.earthdata.nasa.gov login USERNAME password PASSWD" > ~/.netrc ; > ~/.urs_cookies
chmod 0600 ~/.netrc

where USERNAME and PASSWD are your Earthdata Login credentials.

They have a link to the Earthdata login website where you can create a user account


Hope this help,
Jonathan Sherman