title: Deploying to the Crashlytics Beta service from an Xcode Bot
body: <p>I'm trying to use the command line deployment method to upload an iOS beta to Crashlytics (Crashlytics.framework/submit) in a post archive step using an Xcode Bot on Xcode Server.</p>
  
  <p>The problem is that Crashlytics doesn't appear to be able to sign the ipa file correctly.</p>
  
  <p>According to their support i need to unlock the keychain. I have tried the following but the error persists:</p>
  
  <ul>
  <li><code>security unlock-keychain -p the-password /Library/Keychains/System.keychain</code></li>
  <li>Unlocking the keychain via the server GUI (Keychain Access)</li>
  <li>Running security list-keychains only lists <code>/Library/Keychains/System.keychain</code> and the certificate and private key are imported and present in that keychain.</li>
  </ul>
  
  <p>The error:</p>
  
  <pre><code>2015-02-04 10:43:06.247 submit Crashlytics: Crashlytics.framework/submit 1.3.1 (11)
  2015-02-04 10:43:06.981 submit Crashlytics: Unable to find a certificate with a private key: Error Domain=CLSProvisioningProfileErrorDomain Code=-1 "The operation couldn�t be completed. (CLSProvisioningProfileErrorDomain error -1.)" UserInfo=0x10020e250 {Details=iPhone Distribution: ****** (*****), SourcePath=/var/folders/rk/758w2bp12sq1lh5q5mrj598h000087/T/upload/Payload/our.bundle.id/embedded.mobileprovision}
  2015-02-04 10:43:07.002 submit Crashlytics: Failed to prepare the binary for release
  Error uploading to Crashlytics
  </code></pre>
  
  <p>Maybe the issue has something to do with the Xcode Bot running as another user called <code>_xsomething</code>?</p>