Bug Summary
After adding a WP Engine host in Local Connect, pull operations fail.
Steps to reproduce
- Running on Linux (or I suspect Mac as well), set up Local connect with a WP Engine host.
- Attempt to pull a site.
- Observe that no files are synchronised, the database is not synchronised, and there are errors in your local logs.
Environment Info
Local 6.7.1+6369
Ubuntu 22.04LTS
Supporting info
Log of symptoms:
{"thread":"main","class":"DevKitService","message":"wpe_cli+rsync+pull+REDACTED@REDACTED.ssh.wpengine.net: Permission denied (publickey).\r\n","level":"warn","timestamp":"2023-05-11T15:02:39.203Z"}
{"thread":"main","class":"DevKitService","message":"rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]\nrsync error: unexplained error (code 255) at io.c(231) [Receiver=3.2.7]\n","level":"warn","timestamp":"2023-05-11T15:02:39.205Z"}
{"thread":"main","class":"DevKitService","message":"wpe_cli+db+pull+REDACTED@REDACTED.ssh.wpengine.net: Permission denied (publickey).\r\n","level":"warn","timestamp":"2023-05-11T15:02:40.634Z"}
{"thread":"main","class":"WPEPullService","message":{"error":{"errno":-2,"code":"ENOENT","syscall":"open","path":"/home/REDACTED/Local Sites/REDACTED/app/public/.wpengine-conf/wp-config-site.php"},"eventId":"dcf1f918d6824e6da2bfcf9db9ee72bf"},"level":"error","timestamp":"2023-05-11T15:02:40.667Z"}
Log of cause (observed when removing & re-adding a new WPEngine host to Local Connect)
{"thread":"main","class":"SSHKeyService","errno":-2,"code":"ENOENT","syscall":"open","path":"%%userDataPath%%/ssh/wpe-connect.pub","level":"warn","message":"Error reading SSH public key file: ENOENT: no such file or directory, open '%%userDataPath%%/ssh/wpe-connect.pub'","stack":"Error: ENOENT: no such file or directory, open '%%userDataPath%%/ssh/wpe-connect.pub'","timestamp":"2023-05-11T15:06:42.619Z"}
Attempting to open “%%userDataPath%%” on a Linux machine seems highly suspect.