在我将Xcode (升级到6.0.1)和OS (升级到3.2.1)之后,我不知道如何为供应配置文件添加证书,以便Xcode bot能够找到它们。
通过将.mobileprovision文件复制到/Library/Developer/XcodeServer/ProvisioningProfiles,我成功地添加了配置文件
但是我在日志中得到的错误是:
CodeSign /Library/Developer/XcodeServer/Integrations/Caches/017d83d8975db54bc8279c2fcc0304a6/DerivedData/Build/Products/Server\ build-iphoneos/Test.app
cd /Library/Developer/XcodeServer/Integrations/Caches/017d83d8975db54bc8279c2fcc0304a6/Source/TEST
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Signing Identity: "iPhone Distribution: Greener Pastures ApS"
Provisioning Profile: "Greener Pastures Enterprise TEST"
(03F7CD73-FB25-422E-22A4-A80F12041005)
/usr/bin/codesign --force --sign 746ADC85C62D54BEC9FA874A8D777A38D4DB95CA --keychain /Library/Developer/XcodeServer/Keychains/Portal.keychain --resource-rules=/Library/Developer/XcodeServer/Integrations/Caches/017d83d8975db54bc8279c2fcc0304a6/DerivedData/Build/Products/Server\ build-iphoneos/Fnug.app/ResourceRules.plist --entitlements /Library/Developer/XcodeServer/Integrations/Caches/017d83d8975db54bc8279c2fcc0304a6/DerivedData/Build/Intermediates/Fnug.build/Server\ build-iphoneos/Fnug.build/Fnug.app.xcent /Library/Developer/XcodeServer/Integrations/Caches/017d83d8975db54bc8279c2fcc0304a6/DerivedData/Build/Products/Server\ build-iphoneos/Fnug.app
746ADC85C62D54BEC9FA874A8D777A38D4DB95CA: no identity found
Command /usr/bin/codesign failed with exit code 1它看起来像:“我找不到指定的供应配置文件的证书”。
而且看起来证书应该在文件/Library/Developer/XcodeServer/Keychains/Portal.keychain - which中,不幸的是,我无法编辑。
我尝试通过以下方法将证书添加到文件中
sudo security import "/Users/administrator/Desktop/Greener Pastures Enterprise Distribution TEST Certificate.p12" -k /Library/Developer/XcodeServer/Keychains/Portal.keychain -A -T /usr/bin/codesign -T /usr/bin/xcodebuild -T /usr/bin/pkgbuild但这促使我输入了“密钥链密码”。而我没有(不,这不是管理员帐户的密码或证书密码)。
有人知道怎么解决这个问题吗?
发布于 2014-09-19 12:42:32
尝试首先将服务器添加到开发人员门户,并从项目中删除所有限制,如显式配置文件。
如果这不起作用,file a Radar会解释你的配置,以及为什么你认为苹果应该支持它。
如果你真的,真的很确定这是一个好主意,黑客攻击你的服务器,可能打破它,打开你的服务器上的一个终端从一个帐户上的管理员特权,并:
Password:您的管理员-密码
sudo chown
whoami:staff ~/Desktop/Portal.keychain 2.将Portal密钥链密码设置为“123” 安全集-密钥链-密码-o "sudo cat /Library/Developer/XcodeServer/SharedSecrets/PortalKeychainSharedSecret“~/桌面/Portal.keyChainNew Password:123
Retype New Password: 123
sudo cat /Library/Developer/XcodeServer/SharedSecrets/PortalKeychainSharedSecret“~/桌面/Portal.keyChain
Password:您的管理员-密码(可选步骤)
Old Password: 123
它可能会或不会再次向您询问管理员密码,请注意提示。
不要只是盲目地将密钥复制到Portal密钥链。首先尝试其他解决方案,如果需要帮助,请询问堆栈溢出。只在 filing a Radar之后才遵循这个程序,而不仅仅是因为“事情不工作”。当您不完全确定您在这里做什么时,会破坏您的系统。
替代程序(高级程序):
将以下脚本复制为importP12.sh
#!/bin/sh
importP12()
{
P12FILE="$1"
XCS="/Library/Developer/XcodeServer";
XCBIN="$XCS/CurrentXcodeSymlink/Contents/Developer/usr/bin";
PORTALKC="$XCS/Keychains/Portal.keychain"
PORTALKCS="$XCS/SharedSecrets/PortalKeychainSharedSecret"
sudo security -i <<IMPORT
unlock-keychain -p "`sudo cat $PORTALKCS`" $PORTALKC
import "$P12FILE" -k $PORTALKC -T "$XCBIN/xcsbuildd" -T "$XCBIN/xcscontrol" -T "$XCBIN/xcodebuild" -T /usr/bin/codesign
lock-keychain $PORTALKC
IMPORT
}
echo "Please enter your account password:"
for p12 in "$@"
do
importP12 "$p12"
done然后去做
> importP12.sh your p12-file.p12
Password:您的管理员-密码
应该出现一个对话框,请求您输入P12导入密码,并设置您。
发布于 2014-09-24 10:28:37
马特莫里亚蒂的这一回答给了我一个解决方案:https://devforums.apple.com/message/1022214#1022214
我刚和我们的开发团队重新连接了构建服务器。这使得Xcode服务重新初始化它所需的所有证书和配置配置文件。现在,集成构建运行时没有错误。
重要的是不要使用您自己的配置文件。采用"iOS Developer (自动)“设置。
发布于 2014-09-22 07:54:00
如果您让它与旧的osx服务器和xcode 5一起工作,那么只需:
$ mv /Library/Developer/XcodeServer/Keychains/Portal.keychain /Library/Developer/XcodeServer/Keychains/Portal.keychain.bkp
$ ln -s /-s/Keychains/System.keyChain
旧服务器使用系统密钥链。
https://stackoverflow.com/questions/25913665
复制相似问题