Ryan Ricard

www topics worth sharing.

Rsync Timeout Deploying Octopress Site

Today I found myself a victim of the following message when attempting to deploy my first Octopress site to Dreamhost:

## Deploying website via Rsync ssh: connect to host domain.com port 22: Operation timed out rsync: connection unexpectedly closed (0 bytes received so far) [sender] rsync error: unexplained error (code 255) at /SourceCache/rsync/rsync-40/rsync/io.c(452) [sender=2.6.9] FAILED

I was able to ssh to my server without authenticating–so configuring ~/.ssh/authorized_keys for passwordless login was not the issue.

So trusting Rsync was functioning correctly, I began questioning my configuration. The following is my initial configuration to deploy my Octopress site with Rsync:

Initial Octopress Rsync Config
1
2
3
4
5
  ssh_user       = "user@mysite.com"
  ssh_port       = "22"
  document_root  = "~/mysite.com/"
  rsync_delete   = true
  deploy_default = "rsync"

With so little configuration, all of which looking correct, the issue was not obvious. So naturally I questioned the lone trailing slash on document_root. Below is my final configuration–with the trailing slash removed the deployment magically started working.

Final Octopress Rsync Config
1
2
3
4
5
  ssh_user       = "user@mysite.com"
  ssh_port       = "22"
  document_root  = "~/mysite.com"
  rsync_delete   = true
  deploy_default = "rsync"

Comments