productsign still ask for password even keychain unlocked and cert given permission on import

Viewed 117

I am trying to automate productsign of my pkg installer.

On security import I gave productsign access

security import ${P12_PATH} -f 'pkcs12' -k ${KEYCHAIN_NAME} -P ${P12_INSTALLER_PASSWORD} -T /usr/bin/productsign

I can also see from keychain that productsign has been given the access enter image description here

But when I try to sign the pkg, the computer still popup and ask for the keychain password to access the key.

security unlock-keychain -p ${KEYCHAIN_PASSWORD} ${KEYCHAIN_NAME}
/usr/bin/productsign --timestamp --keychain ${KEYCHAIN_NAME} --sign 'Developer ID Installer: xxxx' ${binary_path} signed.pkg

enter image description here

Any suggestion what I did wrong? How can I productsign without prompting any password input.

0 Answers
Related