Is it possible to use a .netrc file on Windows when I\'m using Git to clone a remote repository with HTTP and user - password?
I am posting a way to use _netrc to download materials from the site www.course.com.
If someone is going to use the coursera-dl to download the open-class materials on www.coursera.com, and on the Windows OS someone wants to use a file like ".netrc" which is in like-Unix OS to add the option -n instead of -U for convenience. He/she can do it like this:
Check the home path on Windows OS: setx HOME %USERPROFILE%(refer to VonC's answer). It will save the HOME environment variable as C:\Users\"username".
Locate into the directory C:\Users\"username" and create a file name _netrc.NOTE: there is NOT any suffix.
the content is like: machine coursera-dl login
Use a command like coursera-dl -n --path PATH to download the class materials. More coursera-dl options details for this page.