Q:

Fastlane build works from command line, not from Jenkins

I have a very simple fastlane setup:
lane :buildonly do
  build_app scheme: "MyApp", configuration: "Release", export_xcargs: "-allowProvisioningUpdates"
end

This lane works perfectly on command line completely unattended (I had to enter my credentials the first time, but now it remembers them).
[16:54:39]: Successfully exported and compressed dSYM file
[16:54:39]: Successfully exported and signed the ipa file:
[16:54:39]: /Users/jenkins/MyApp/MyApp.ipa

+------+------------------+-------------+
|           fastlane summary            |
+------+------------------+-------------+
| Step | Action           | Time (in s) |
+------+------------------+-------------+
| 1    | default_platform | 0           |
| 2    | build_app        | 594         |
+------+------------------+-------------+

[16:54:40]: fastlane.tools just saved you 10 minutes! 

I set up a simple Jenkins job (same machine, same user) that just clones my repo and runs the script
bundle install
bundle exec fastlane buildonly

and this fails pretty much immediately:
[16:59:41]: ▸ === BUILD TARGET MyTarget OF PROJECT MyApp WITH CONFIGURATION Release ===
[16:59:41]: ▸ Check dependencies
[16:59:41]: ▸ Code Signing Error: No signing certificate "iOS Development" found:  No "iOS Development" signing certificate matching team ID "FFFFFFFF" with a private key was found.

What do I have to change about my Jenkins setup so that it can see the same certs as the command line?

A:

Since Jenkins is running using launchd, I had to copy the Jenkins user's certificates from the "login" keychain into "System".
Thanks to this question.

