If it hasn't already been done, please make sure the Trac server's SSH key under /root (I think--whatever user the wiki-sync daemon is running under) is authorized to log in to the wiki server for syncing the htpasswd file.
Later we need to talk using better centralized authentication for Sage-related infrastructure.