How to export the private development key from the system keychain

Can someone explain how to import the the private development key?
According the Appium prerequisites for XCUITest we need to add the keychainPath / keychainPassword capabilities.
In order to do so I need to run 2 commands:
The security create-keychain command (which seems to work fine) & the security import MyPrivateKey.p12.
I guess that the second command should create the private development key file (The capabilites should point to it).
The problem is that when I run the security import MyPrivateKey.p12 I get the following error:
“security: Error reading infile MyPrivateKey10.p12: No such file or directory”

Any help will be most appreciated!

=============================================================
The Appium prerequisites as published in the Appium community:

The commands that needs to be executed:
security create-keychain -p [keychain_password] MyKeychain.keychain
security import MyPrivateKey.p12 -t agg -k MyKeychain.keychain -P [p12_Password] -A

The full path to the keychain can then be sent to the Appium system using the keychainPath desired capability, and the password sent through the keychainPassword capability.

Our main objective is to pass the code 65 we keep receiving when appium attempts to launch the iOS app.
So we tried to follow the below instruction however as mention we fail the import private key.

On some systems there are Accessibility restrictions that make the WebDriverAgent system unable to run. This is usually manifest by xcodebuild returning an error code 65. A workaround for this is to use a private key that is not stored on the system keychain. See this issue and this Stack Exchange post.

To export the key, use

security create-keychain -p [keychain_password] MyKeychain.keychain
security import MyPrivateKey.p12 -t agg -k MyKeychain.keychain -P [p12_Password] -A
where MyPrivateKey.p12 is the private development key exported from the system keychain.

The full path to the keychain can then be sent to the Appium system using the keychainPath desired capability, and the password sent through the keychainPassword capability.

Overcome the code 65 error with the below solution-

@menypeled, were you able to find the solution for…

“security: Error reading infile MyPrivateKey10.p12: No such file or directory”

@menypeled i tried to apply above command but got password error
[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: “Command ‘security -v unlock-keychain -p v /Users/C*****/Desktop/Certificates.p12’ exited with code 49”

Did you see this and resolved it before?

The only thing the worked for me is the full installation as explained in the video link I have posted (see above post).
I didn’t configure the keychain.
Good luck