Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.netrc on windows #160

Closed
5shekel opened this issue Sep 14, 2011 · 8 comments
Closed

.netrc on windows #160

5shekel opened this issue Sep 14, 2011 · 8 comments

Comments

@5shekel
Copy link

@5shekel 5shekel commented Sep 14, 2011

on windows you cant create file starting with dot.
might be a problem with the module itself.
also it is not clear waht should be inside that netrc file.

youtube-dl.py -n http://www.youtube.com/watch?v=HO1OV5B_JDw
WARNING: parsing .netrc: [Errno 2] No such file or directory: 'd:\\bin\\.netrc'
@phihag
Copy link
Contributor

@phihag phihag commented Sep 14, 2011

.netrc contains usernames and password for various network services, kind of like the password manager in your browser. Although the Python module for netrc is available on Windows, it's pretty much useless without cygwin or the Windows POSIX subsystem (haha).

The fix for your problem is simple: Don't use -n or --netrc unless you have a netrc file configured, which seems not to be the case on your Windows installation. If you need to specify a username and a password (and you don't for http://www.youtube.com/watch?v=HO1OV5B_JDw , which is public), use the --username and --password options.

I'm closing this issue because simply omitting -n should fix the problem. If that isn't the case, please comment and reopen.

@phihag phihag closed this Sep 14, 2011
@5shekel
Copy link
Author

@5shekel 5shekel commented Nov 30, 2013

hi there, can we take a second look at windows integration of netrc.
seems it can be done , or am i wrong
https://www.labkey.org/wiki/home/Documentation/page.view?name=netrc

@5shekel
Copy link
Author

@5shekel 5shekel commented Jun 3, 2016

bump

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 3, 2016

.netrc works fine on Windows.

@5shekel
Copy link
Author

@5shekel 5shekel commented Jun 3, 2016

but how? i'm probably missing something.
windows doesn't let me save a dot file (file starting with dot) and youtube-dl explicitly asks for .netrc.

youtube-dl.exe -v -n EYimjHuU99c
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['-v', '-n', 'EYimjHuU99c']
[debug] Encodings: locale cp1252, fs mbcs, out cp437, pref cp1252
[debug] youtube-dl version 2016.06.03
[debug] Python version 3.4.4 - Windows-10-10.0.10586
[debug] exe versions: ffmpeg 3.0.1, ffprobe 3.0.1
[debug] Proxy map: {}
WARNING: parsing .netrc: [Errno 2] No such file or directory: 'c:\\dir\\.netrc'
...
@5shekel
Copy link
Author

@5shekel 5shekel commented Jun 3, 2016

amazing, tnx!

@svefn
Copy link

@svefn svefn commented Jun 17, 2019

hi, i have trouble linking to the .netrc file in Windows with $home not set. i have manually set HOME="C:/Users/username/" and it can't find the .netrc file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants
You can’t perform that action at this time.