This project is read-only.

Code Sign Error While Using TFSXCodeBuild

Jun 4, 2012 at 4:03 PM

I am getting the following error when trying to use TFSXCodeBuild.

"User interaction not allowed"

I tried security unlock and it is not helping. Has anyone had similar issue and found solution?




Jun 4, 2012 at 4:05 PM

Can you explain where and when you are getting this error?  In what context are you using it?  Are you building from source? What version of TFS?  Please pass along any details you can think of.

Jun 4, 2012 at 4:26 PM

We are using TFS 2010.

We have Xcode from Mac connecting to TFS using SVNBridge for source control.

We have created a team build on TFS 2010 using TFSXCodeBuild template to download the source code into a Mac machine and run build using SSH.

The source code is building locally without any error on Mac. We have a certificate and private key on the login.keychain on Mac machine which is used for code signing the build.

However, when I run the team build from TFS, the same source code fails to build successfully.

The error is "User interaction is not allowed. Command /usr/bin/codesign failed with exit code 1".

I tried running "security unlock-keychain -p <password> ~/Library/Keychains/login.keychain" as part of the build, still no success.

Please let us know if you know any solution to this. Please let me know what other details you need.

Your help is highly appreciated. Thanks.

Jun 4, 2012 at 4:33 PM

This is because codesign is trying to put up a dialog to accept Keychain access for that user.  Can you try an interactive login AS that user and build the software once, allowing codesign to present the dialog, accept permanently, and then try the automated build again?

Jun 4, 2012 at 6:37 PM

Yes, we have already selected "Allways Allow Access" during the first build after setting up certificates during an interactive login session.

Sep 21, 2012 at 9:23 AM

I got the same issue and solved it by replacing ~/Library/Keychains/login.keychain by /Users/$(Your USERNAME)/Library/Keychains/login.keychain

Hope this helps.