美文网首页
codesign repeatedly asks for acc

codesign repeatedly asks for acc

作者: 那月无痕 | 来源:发表于2023-07-10 19:43 被阅读0次

    记录一次使用开发证书进行真机调试,重复弹窗提示输入管理员用户名密码的解决经历。

    问题描述

    I'm trying to migrate the scripts that build my application from an Intel Mac running Mojave (Xcode 10.3) to an M1 Mac running Big Sur (Xcode 12.5.1).
    
    On the M1 Mac, codesign triggers a pop up a window asking for an admin username/password each time it signs something. This happens whether it is invoked via a script or directly in Terminal. The pop-up appears twice when signing a Universal binary, once when signing a single-architecture binary.
    
    The popup says:
    
    macOS wants to make changes. Enter an adminstrator's name and password to allow this.
    
    macOS wants to use the "System" keychain.
    
    and it has a "Deny" button and an "Allow" button, but not an "Always Allow" button. (Another issue: the username is not pre-populated, even though I am logged in as an admin.)
    
    My "Developer ID Application" certificate is stored in my login keychain, as is the "Apple Worldwide Developer Relations Certification Authority" certificate, which expires 2030-02-19.
    
    The "System" keychain contains an "Apple Application Integration Certification Authority" certificate expiring 2026-10-20. (Another issue: that certificate can't be deleted!)
    
    Suggestions?
    
    解决方案
    I was having the same issue, and it didn't offer the "always allow" option, only "allow". The way I found to fix this was to find the certificate you are using to sign the app during the build process in Keychain Access, expand it to show the signing key, right click on the key and choose get info. Go to the access control tab, and you have one of two options:
    
    1. Choose "Allow all applications to access this item" (not secure)
    2. Choose "Confirm before allowing access" and add "codesign" and "Xcode" to the list of allowed list of applications. (you'll need to do a global search to find where codesign resides on your machine)
    After this, you will no longer get the repeated password prompt.
    

    附图


    image.png image.png

    相关文章

      网友评论

          本文标题:codesign repeatedly asks for acc

          本文链接:https://www.haomeiwen.com/subject/edtyudtx.html