Jenkins问题

作者: Hello75kg | 来源:发表于2016-05-22 19:49 被阅读3022次

1. iOS编译签名文件找不到

Check dependencies
Code Sign error: No matching provisioning profile found: Your build settings specify a provisioning profile with the UUID “75025357-245d-448b-9343-96148a0xxxxx”, however, no such provisioning profile was found.

原因是jenkins以jenkins用户身份运行,iOS项目编译用的签名文件要从安装证书时的用户目录
~/Library/MobileDevice/Provisioning\ Profiles/75025357-245d-448b-9343-96148a0xxxxx.mobileprovision
拷贝到
/Users/Shared/Jenkins/Library/MobileDevice/Provisioning\ Profiles/75025357-245d-448b-9343-96148a0xxxxx.mobileprovision

2. iOS编译证书找不到

Check dependencies
Code Sign error: No codesigning identities found: No codesigning identities (i.e. certificate and private key pairs) that match the provisioning profile specified in your build settings
(“testxxxxx_Distribution_inhouse_01”) were found.

没找到证书,打开“钥匙串访问”,从“登录”拷贝安装的证书到“系统”下

3.User interaction is not allowed.

Signing Identity: "iPhone Distribution: ****************** Co., Ltd."
Provisioning Profile: "************"
(************-****-****-****-************)

/usr/bin/codesign --force --sign ************************************ --entitlements /Users/Shared/Jenkins/Home/workspace/****/build/**************.build/Release-iphoneos/*************.build/****.***.****--timestamp=none /Users/Shared/Jenkins/Home/workspace/********/build/Release-iphoneos/****.app

/Users/Shared/Jenkins/Home/workspace/*****/build/Release-iphoneos/****.app: User interaction is not allowed.
Command /usr/bin/codesign failed with exit code 1�[0m�[2m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━�[0m

�[1m�[31m** BUILD FAILED **�[0m �[2m(89065 ms)�[0m

Build step 'Execute shell' marked build as failure
Finished: FAILURE

拷贝~/Library/Keychains/login.keychain到
Users/Shared/Jenkins/Library/Keychains/login.keychain
在jenkins执行编译的脚本中加入命令解锁jenkins的钥匙串
/usr/bin/security unlock-keychain -p pwd ~/Library/Keychains/login.keychain
(执行一次后可将这行代码删除)

4. ssh连接git问题

jenkins连接gitlab需要ssh key

通过命令 ssh-keygen -t rsa -C "xxx@xxx" 生成key

将公钥(~/.ssh/id_rsa.pub)内容拷贝到gitlab-profile setting的SSH KEYS字段

jenkins连接需要私钥(~/.ssh/id_rsa),有两个地方可以添加

a.jenkins用户的Private Key字段(在项目配置-源码管理-Credentials-add中选择SSH Username with private key
b.或者在全局菜单Credentials-Global credentials (unrestricted)中进行管理)

相关文章

网友评论

  • 鬼崇祟:问一下jenkins部署在了linux下,没有这个目录的话手动创建可以吗
  • manajay:No valid iOS Development signing identities belonging to team were found
  • 3508151aec64:解决了我遇到的问题,非常感谢分享
  • Sevenuncle:楼主你好,第一个问题怎么解决啊?我文件已经手动拷贝过去了,还是一样报错
    梅西121:你好,这个问题解决了吗
  • 以技术之名:楼主,你好,我想问下/Users/Shared/Jenkins/Library没有 MobileDevice这个文件夹是什么原因呢
    Hello75kg:@Flying_Einstein 目录找不到手动创建就好啦

本文标题:Jenkins问题

本文链接:https://www.haomeiwen.com/subject/ekzorttx.html