Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I run this command from within vim:

:Nread ftp://myusername@passtomyhoster.com:21/html/

And vim prints out:

Name (passtomyhoster.com:mymacusername): Permission denied.
Please login with USER and PASS.
Please login with USER and PASS.
Please login with USER and PASS.
ftp: Login failed

So what's really strange is, that

  • I'm not prompted for any password
  • Somehow vim adds my mac username instead of the one I pointed out in the command
  • the exact same line works on linux

Why's that?

share|improve this question
    
What about :Nread ftp://user:password@host:21/html/? –  romainl Sep 30 '12 at 11:18
    
Resolves into nodename nor servname provided, or not known ... –  shredding Sep 30 '12 at 11:21
2  
Also see :help netrw-start –  Alexander Chen Sep 30 '12 at 11:21
add comment

migrated from stackoverflow.com Oct 1 '12 at 10:30

This question came from our site for professional and enthusiast programmers.

1 Answer

Adding a line like this to my .netrc file did the trick:

machine passtomyhoster.com
    login myusername
    password mypassword
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.