"UseKeychain yes" in SSH config breaks Local Sync

Bug Summary

After updating Local, File list fails to load when trying to sync with WP Engine servers. This happens if you use software that generates an SSH config file with “UseKeychain yes” in it. Only after deleting the SSH config file did the Push / Pull feature work again.

Steps to reproduce

  • Use any software that generates an SSH config file. I use SourceTree. After configuring SourceTree to connect to my Github account, it generated the following in my SSH config file:

— Sourcetree Generated —

Host ethanmay-GitHub
HostName github.com
User ethanmay
PreferredAuthentications publickey
IdentityFile /Users/ethan.may/.ssh/ethanmay-GitHub
UseKeychain yes
AddKeysToAgent yes

----------------------------

I tried to add “IgnoreUnknown UseKeychain” right before “UseKeychain yes” and using Local sync again, but it didn’t fix it.

  • Attempt to Push or Pull files from a WP Engine install
  • Observe the file list fails to load
  • Delete the SSH config file from your machine
  • Attempt to Push or Pull files from a WP Engine install
  • Observe the file list loads properly and Push/Pull works without issue

Environment Info

  • MacOS Monterey 12.7
  • Nginx / Apache / PHP / MySQL any versions
  • Local Version 8.0.1+6490

Supporting info

Relevant logs:
{“class”:“RsyncService”,“level”:“debug”,“message”:“Running rsync with following args: ‘–recursive’, ‘–delete’, ‘–compress’, ‘–links’, ‘–times’, ‘–exclude-from=/Users/ethan.may/Local Sites/amwayabo/app/public/.wpe-pull-ignore’, ‘–exclude=wp-config.php’, ‘–exclude=wpeprivate/', ‘–exclude=.wpe-devkit/’, ‘–exclude=.wpengine-conf/’, ‘–exclude=.wpe-connect/’, ‘–exclude=wp-content/mu-plugins/wpe-devkit.php’, ‘–exclude=wp-content/mysql.sql’, ‘–exclude=.git/’, '–exclude=autoupdater_backup/', ‘–exclude=wp-content/object-cache.php’, '–exclude=.bin/’, ‘–exclude=vendor/bin/*’, ‘–exclude=node_modules/puppeteer’, ‘–exclude=wp-content/mu-plugins/mu-plugin.php’, ‘–exclude=wp-content/mu-plugins/wpengine-common/’, ‘–exclude=wp-content/mu-plugins/slt-force-strong-passwords.php’, ‘–exclude=wp-content/mu-plugins/force-strong-passwords/’, ‘–exclude=wp-content/mu-plugins/wpe-wp-sign-on-plugin.php’, ‘–exclude=wp-content/mu-plugins/wpe-wp-sign-on-plugin/’, ‘–exclude=wp-content/mu-plugins/wpengine-security-auditor.php’, ‘–exclude=wp-content/mu-plugins/wpe-cache-plugin/’, ‘–exclude=wp-content/mu-plugins/wpe-cache-plugin.php’, ‘–exclude=local-phpinfo.php’, ‘–exclude=local-xdebuginfo.php’, ‘–exclude=wp-content/mu-plugins/local-by-flywheel-demo-urls.php’, ‘–exclude=wp-content/mu-plugins/local-by-flywheel-live-link-helper.php’, ‘–exclude=.wpe-pull-ignore’, ‘–exclude=.wpe-push-ignore’, ‘–exclude=.gitignore’, ‘–dry-run’, ‘–out-format={"type": "%i","path": "%n","size": %l,"mtime": "%M"}’, ‘-e’, ‘ssh -o PubkeyAcceptedKeyTypes=+ssh-rsa -o ServerAliveInterval=60 -o ServerAliveCountMax=120 -o StrictHostKeyChecking=accept-new -o UserKnownHostsFile="/Users/ethan.may/.ssh/known_hosts" -i "%%userDataPath%%/ssh/wpe-connect"’, ‘local+rsync+amwayabodev@amwayabodev.ssh.wpengine.net:/sites/amwayabodev/’, ‘/Users/ethan.may/Local Sites/amwayabo/app/public/’”,“thread”:“main”,“timestamp”:“2023-10-24T16:52:50.280Z”}
{“class”:“RsyncService”,“level”:“warn”,“message”:“/Users/ethan.may/.ssh/config: line 8: Bad configuration option: usekeychain\r\n/Users/ethan.may/.ssh/config: line 18: Bad configuration option: usekeychain\r\n”,“thread”:“main”,“timestamp”:“2023-10-24T16:52:50.339Z”}
{“class”:“RsyncService”,“level”:“warn”,“message”:“/Users/ethan.may/.ssh/config: terminating, 2 bad configuration options\r\n”,“thread”:“main”,“timestamp”:“2023-10-24T16:52:50.340Z”}
{“class”:“RsyncService”,“level”:“warn”,“message”:“rsync: connection unexpectedly closed (0 bytes received so far) [Receiver]\nrsync error: unexplained error (code 255) at io.c(226) [Receiver=3.1.3]\n”,“thread”:“main”,“timestamp”:“2023-10-24T16:52:50.340Z”}
{“class”:“ConnectManifestWpeService”,“level”:“error”,“message”:“Error creating manifest for WPE Service”,“sentryEventId”:“5b27f78566fc435c910d98dc5a36e331”,“thread”:“main”,“timestamp”:“2023-10-24T16:52:50.342Z”}
{“class”:“ConnectManifestWpeService”,“level”:“error”,“message”:“rsync process existed with code 255”,“stack”:“Error: rsync process existed with code 255\n at ChildProcess. (%%appPath%%/main/rsync/RsyncService.js:1:1548)\n at ChildProcess.emit (node:events:513:28)\n at ChildProcess._handle.onexit (node:internal/child_process:291:12)”,“thread”:“main”,“timestamp”:“2023-10-24T16:52:50.342Z”}
{“level”:“debug”,“message”:“Database responded to ping.”,“service”:{},“serviceBinVersion”:{},“thread”:“main”,“timestamp”:“2023-10-24T16:52:53.491Z”}

Hi @ethanmay

Our Devs have released a Beta version with a change that might resolve this. Would you be able to give it a test and let us know if it works for you?

Downloaded the Beta and followed all the same steps, everything seems to be working for me! Thanks for fixing.

1 Like

Thank you for trying that and reporting back @ethanmay!

1 Like

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.