app-store-connect create-certificate \
    --type MAC_INSTALLER_DISTRIBUTION \
    --certificate-key=@file:/path/to/cert_key \
    --save
    

    Use cert_key of the private key you created earlier.

Fetch the Mac Installer Distribution certificates:

    
app-store-connect list-certificates \
    --type MAC_INSTALLER_DISTRIBUTION \
    --certificate-key=@file:/path/to/cert_key \
    --save

Set up a new temporary keychain to be used for code signing:

    
keychain initialize
    

    
      Restore Login Keychain!
  After running keychain initialize you must run the following:

      keychain use-login

      This sets your login keychain as the default to avoid potential
  authentication issues with apps on your machine.