1

I built the input file (decoded base64 file into p12 file) as CERTIFICATE_PATH, P12_PASSWORD is password in secret, KEYCHAIN_PATH is defined. when I run the command on CLI, I get "1 item imported" success message. but when I run from *.yml file on GitHub action, I get "security: SecKeychainItemImport: One or more parameters passed to a function were not valid." error. any suggestions?

security import $CERTIFICATE_PATH -P $P12_PASSWORD -A -t cert -f pkcs12 -k $KEYCHAIN_PATH

CERTIFICATE_PATH - file that contains cert.p12 data, KEYCHAIN_PATH is TEMP/app-signing.keychain-db

  • 1
    Add your yaml workflow definition to your question, otherwise it's difficult to answer. – riQQ Apr 14 '21 at 07:03

2 Answers2

1

Another reason in Github actions could be that you are using the wrong environment. Take a look at this ---> Difference between Github's "Environment" and "Repository" secrets?.

Set the right environment: environment: production

ouflak
  • 2,458
  • 10
  • 44
  • 49
Bharath NS
  • 43
  • 7
0

found the issue.. was passing wrong cert file.. once added correct file in the security build , was able to get it working