Page 1 of 1

How to create .urs_cookies?

Posted: Thu Jul 14, 2022 11:46 pm America/New_York
by yang16
Dear Earthdata Forum,

I tried to install wget on my windows10 system to download https in a text file. But when I ran "NUL > .urs_cookies" in cmd window, there was no such a file. Then I created this file in C:, but I wonder what contents should I write in this file?
Wget for windows.jpg
Wget for windows.jpg (84.88 KiB) Not viewed yet
Thank you in advance.
Amy.

Re: How to create .urs_cookies?

Posted: Mon Jul 18, 2022 10:57 am America/New_York
by njester
Generally, your username/password go into a .netrc file (at least for cygwin, linux, and mac) and the .urs_cookie is empty, but if you construct your wget call correctly it'll log in and update the cookie for you. That being said, recently, it seems like Earthdata is moving from username/password login to token login. If it's not working, I assume that it's looking for a token. Here's a link to a page that shows how to add a login token to your wget request.

viewtopic.php?t=2329