Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can _netrc handle passphrases with spaces?

Tags:

git

.netrc

The following configuration works:

machine code.mycompany.net
login supernerd
password HelloW0rld

The following configuration doesn't work:

machine code.mycompany.net
login supernerd
password Please excuse my dear aunt sally.
like image 570
Tom Norton Avatar asked Oct 01 '12 14:10

Tom Norton


2 Answers

From this bug report or this page, spaces in password don't seem to be supported in a .netrc (or _netrc) file.
Or even if they are, not all the programs using that .netrc file will be able to interpret said space correctly.


As runrig mentions in the comments:

Quoting the field as in another answer here should work, but the python library doesn't like it.
But, e.g., command line ftp and the perl netrc library is fine with it.

So this should work when used when those commands:

password "Please excuse my dear aunt sally."
like image 129
VonC Avatar answered Sep 20 '22 23:09

VonC


Using ftp on IRIX 6.5 running on an SGI, I added quotes around my password and it works fine, e.g.:

password "Please excuse my dear aunt sally." 
like image 34
Jim Avatar answered Sep 19 '22 23:09

Jim