Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins: where is the login.keychain file in /Users/*name*/Library/Keychains folder?

I am trying to packaging an iOS ipa with Jenkins. So I get Keychains and Provisioning Profiles Management plugin and try to upload keychain which it needs. My Mac operating system is sierra(10.12.2), I enter the folder at /Users/admin/Library/Keychains. But there is only a file called login.keychain-db and it's doesn't work when I have uploaded this file on Jenkins. The error says that uploaded file "login.keychain-db" is no keychain or provisioning profile file. So how can I solve it or where can I find login.keychain file? Thanks in advance.

like image 664
Shuhari Avatar asked Jan 16 '17 16:01

Shuhari


People also ask

Where is~/ Library keychains?

Keychains can be viewed and edited through the Keychain Access application or using the command-line utility security . Keychain files are located in ~/Library/Keychains/ , /Library/Keychains/ , and /Network/Library/Keychains/ .

How do I add a keychain to Jenkins?

Upload keychain and provisioning profile files sectionClick on "Choose File" and select the keychain or provisioning profile file. 2. Click on "Upload". The keychain or provisioning profile file is automatically uploaded and stored on the jenkins.

How to Find keychain on Mac?

In the Keychain Access app on your Mac, if you don't see a list of keychains, choose Window > Keychain Viewer or press Command-1. Select the keychain that you want to view. To see more information about an item, either double-click it or select it and click the Info button in the toolbar.

How do you change your keychain password?

Under the edit menu, select Change Password for Keychain 'login'. 3. Enter your old network password or another previous password you have used in the Current Password box. Enter your current network password in the New Password box and Verify box and click OK.


1 Answers

You can simply unlock your keychain through shell. In your Jenkins project configuration, add an 'execute a script shell' step :

security unlock-keychain -p PASSWORD ${HOME}/Library/Keychains/login.keychain

security set-keychain-settings -t 3600 -l ${HOME}/Library/Keychains/login.keychain

Note. The 'set-keychain-settings' leaves the keychain unlocked for a while (3600s), so your build process (xcodebuild in your case) still have access to the keychain when it's signing the IPA.

Note 2. The keychain extension changed with Sierra, it's now .keychain-db indeed. Using directly the security command won't affect you.

like image 53
Tanguy G. Avatar answered Oct 22 '22 14:10

Tanguy G.