OSX security find-identity can't find identities in ssh-ed machine

房东的猫 提交于 2019-12-24 15:16:06

问题


I am ssh-ing into otherosx OSX (10.10.3) machine from my OSX(10.10.3) machine in order to build a mac application.

ssh user@otherosx

Then on otherosx I try to import identities like this:

security default-keychain -s /path/to/my/login.keychain
security unlock-keychain 
security import my_identity.p12 -P passphrase

Then I try to find my identity:

security find-identity

and I get this:

Policy: X.509 Basic
  Matching identities
   0 identities found

  Valid identities only
   0 valid identities found

Does anyone know how to fix this? Did anyone experience the same issue?

PS. I also tried full paths everywhere, and security list-keychains -s /path/to/my/login.keychain before unlocking keychain and searching for identities.


回答1:


OK, it seems that if you import like this:

security import my_identity.p12 -k /path/to/my/login.keychain -P passphrase

then it works. At least worked once for me.

It seems this might also be related to these questions:

"User interaction is not allowed" trying to sign an OSX app using codesign

Xcode, Codesign Error from Jenkins / SSH - "User Interaction is not allowed"




回答2:


Run the command "security list-keychain" remotely and check if it is listing your keychain. I my case it wasn't. So I fixed it upgrading my OSX to the last version. I read about some problems with the Sierra version of the OSX.



来源:https://stackoverflow.com/questions/29914718/osx-security-find-identity-cant-find-identities-in-ssh-ed-machine

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!