Skip to content

Manual creation of .netrc file

Ibrahim Mohammed edited this page Mar 1, 2023 · 1 revision

NASAaccess .netrc file wiki!

The .netrc file and the _netrc file (only for Windows OS machines) are generated automatically when installing the NASAaccess R software package. However, if the user wants to create theses access files manually here are the steps needed.:

  1. Define HOME variable in your Environment Variables by picking any directory you want to be referenced as your HOME directory. In many machines HOME directory is already set to be your personal Documents folder (i.e., C:\Users\yourname\Documents).

  2. Create .netrc & _ntrc files in your home directory. Run these commands in your command prompt.

     cd `HOME`
    
     echo. > .netrc
    
     echo "machine urs.earthdata.nasa.gov login <uid> password <password>" >>  .netrc
     
     echo. > _netrc
    
     echo "machine urs.earthdata.nasa.gov login <uid> password <password>" >>  _netrc 
    

    (where is your user name and is your Earthdata Login password without the brackets)

     echo. > .urs_cookies
    
  3. Open your .netrc & _netrc files by any text editor and remove the quotations before machine and after your password. The .netrc & _netrc files should be without any quotation marks to get the curl command working. The contents of the _netrc and .netrc files should be identical.

Clone this wiki locally