Codesign returns unknown error -1 = fffffffffffffffff

I tried to sign the iOS application code. These are the steps that I followed

    security create-keychain -p password ${KEYCHAIN}
    security set-keychain-settings -u -t 300 ${KEYCHAIN}
    security list-keychains -d user -s login.keychain ${KEYCHAIN}
    security import "$1" -k ${KEYCHAIN} -A -P "${PASSPHRASE}" -A >/dev/null
    security unlock-keychain -p password ${KEYCHAIN}

    /usr/bin/codesign -f -s $IDENTITY --keychain $KEYCHAIN --entitlements $ENTITLEMENTS Payload/Test.app

This returned me. Codesign returned an unknown error -1 = ffffffffffffffff via ssh.

If I directly execute the code sign command in the machine, it successfully signs.

The problem is Mac OS Sierra only.

+18
source share
7 answers

With the same problem adding some time ago

security set-key-partition-list -S apple-tool:,apple:,codesign: -s -k password ${KEYCHAIN}

decided it for me.

+19
source

It turns out the same problem, but when archiving directly from Xcode. Sharing a solution if it helps.

Keychain, , . MacOS Sierra.

:

Relogin Xcode Relogin is required to access accounts after restarting Xcode

Keychain Access Password request when using Keychain Access for some operations

- ... Access to the keychain - an error occurred while accessing the login keychain using the change settings for the key fob ...

( ) Keychain, login .

+16

@madhu , Access Control , , ", ", Jenkins. ( Keychain Access gui - Get Info, Access Control), " ", .

+3

, , : , keychain SSH. , :

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

/ , XCode ( fastlane ), , .

+3

, , p12, KeyChain, root, , Xcode .

, , , .

+1

, ...

, Provisioning Profile ( AdHoc), ~/Library/MobileDevice/Provisioning Profiles/, .

, AppStore , AdHoc ( , ).

0

, . , , .

Open Keychain Access, find the key for your signature certificate (login-> Certificates, then expand the certificate to open its key). Right-click on the key and select: Get information → Access control and select "Allow all applications to access this element."

0
source

Source: https://habr.com/ru/post/1682763/


All Articles