The reason for this is because (in my case anyway) you’re running a localhost version of WordPress on OS X Lion and it needs the login credentials. In the sharing preferences page, Apple removed the FTP option.
This will help:
https://osxdaily.com/2011/09/29/start-an-ftp-or-sftp-server-in-mac-os-x-lion/