<p><em>Update: this is now a <ahref="https://github.com/makyo/sparkleup">project you can use</a>!</em></p>
<p>I found myself wanting a headless version of SparkleShare, and was stymied by <ahref="https://github.com/hbons/SparkleShare/issues/1683">the lack thereof</a>. I wanted to keep some IRC and MUCK logs in a SparkleShare project, but I run my clients for those in a <code>tmux</code> session on a server. However, that server lives elsewhere, and has no X, so, alas, the usual SparkleShare clients were right out.</p>
<p>My solution was a combination of ones I’ve seen elsewhere, and I’m calling it sparkleup because…I dunno, it sounded fun. It looks like this:</p>
<p>My ssh key on the server requires a password — as do all of mine — which makes interacting with SparkleShare programatically difficult. After all, if I just do <code>dazzle link</code> with my normal key, then every time I try to commit to the project, I’ll be asked for a password. I’m not scripting that.</p>
<p>The solution was to generate a new SSH key with no password and <code>dazzle link</code> that. However, since that key lives in <code>~/.ssh/sparkle</code>, git won’t pick up on it by default, because SSH won’t pick up on it by default. Add to that the fact that you can’t select an SSH key for git to use and…bleh.</p>
<p>So the solution was two layered. First, I created a new <code>ssh</code> for git to use. <code>sparkleup/ssh</code> is a script to be passed to git with the <code>GIT_SSH</code> environment variable. It looks like:</p>
<p>That lets me write a job that will, without any interaction from me, commit and push to a SparkleShare project. That’s one script per SparkleShare project I need to manage this way, each of which looks like:</p>