Mahesh Deore
Mahesh Deore

Reputation: 13

Unknown error -1=ffffffffffffffff Command /bin/sh failed with exit code 1 in Jenkins

Code Signing /Users/administrator/Library/Developer/Xcode/DerivedData/Project-fsoqxyfpecqjwcerfwewjovbrmnf/Build/Intermediates/ArchiveIntermediates/Project/InstallationBuildProductsLocation/Applications/Project.app/Frameworks/Bolts.framework with Identity iPhone Distribution: PRASAD SOFT, INC. (**********)
/usr/bin/codesign --force --sign DFFCCDF13EC4BD54B0E8CA11E115D0E77F1C284D  --preserve-metadata=identifier,entitlements '/Users/administrator/Library/Developer/Xcode/DerivedData/Project-fsoqxyfpecqjwcerfwewjovbrmnf/Build/Intermediates/ArchiveIntermediates/Project/InstallationBuildProductsLocation/Applications/Project.app/Frameworks/Bolts.framework'
/Users/administrator/Library/Developer/Xcode/DerivedData/Project-fsoqxyfpecqjwcerfwewjovbrmnf/Build/Intermediates/ArchiveIntermediates/Project/InstallationBuildProductsLocation/Applications/Project.app/Frameworks/Bolts.framework: **unknown error -1=ffffffffffffffff
Command /bin/sh failed with exit code 1**

** ARCHIVE FAILED **

The following build commands failed:


PhaseScriptExecution [CP]\ Embed\ Pods\ Frameworks /Users/administrator/Library/Developer/Xcode/DerivedData/Project-fsoqxyfpecqjwcerfwewjovbrmnf/Build/Intermediates/ArchiveIntermediates/Project/IntermediateBuildFilesPath/Project.build/Release-QA-iphoneos/Shotzr.build/Script-2552EF011E9D1FCA909096CD.sh
(1 failure)

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

Upvotes: 1

Views: 1567

Answers (2)

Tadas Šubonis
Tadas Šubonis

Reputation: 1600

I am going to chip in as well: the problem was with keychain use through SSH. I had to execute these in my session to fix it:

security unlock-keychain -p MY_PASS ~/Library/Keychains/login.keychain
security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k MY_PASS ~/Library/Keychains/login.keychain
security set-keychain-settings ~/Library/Keychains/login.keychain

I've also removed my current certificates system/account certificates by removing my account from XCode (I use fastlane to do building) but I suspect that this shouldn't have impacted it.

Upvotes: 2

Asaf Shveki
Asaf Shveki

Reputation: 736

That's a code signing error, the xcodebuild command can't access your keychain since it's running through Jenkins' slave with SSH.

Run this line on your shell script before you run the xcodebuild in order to allow access:

security set-key-partition-list -S apple-tool:,apple: -s -k <ROOT-PASSWORD> /Users/<YOUR USER NAME>/Library/Keychains/login.keychain-db

Hope that helps!

Upvotes: 5

Related Questions