I have a mac builder setup/connected through team city and already have build scripts running/working to compile my cpp code. I am trying to codesign my libraries using codesign application on Mac OS X Leopard.
Here is the sample command to do codesign
codesign -s "Identity" "ApplicationName"
If I connect to my mac builder through VNC and run this command, it works fine. However, when i put this command in my buildscirpt and call this script from team city, the above command returns "User Interaction is not allowed."
After doing some research, I found out that i may have to unlock the keychain before i use the certificate from that keychain.
I am using this command to unlock my keychain:
security unlock-keychain -p "password" "/Library/Keychains/System.keychain"
I have tested the above command by connecting my mac builder from other mac machine using SSH and call the codesign script and it works fine. However, I run the same script from teamcity and still getting the same error message.
I believe teamcity connects to the mac builder over a HTTP protocol. I tried to google that error for http connection but I didnt find anything significant answer.
Can someone please help me how can I call codesign command from team city to my mac builder.
Thanks in advance,