

You will need to enter an administrator password to approve the application with Gatekeeper, otherwise you can prefix the command with sudo if you’re performing this from SSH or want to automate the process.Īnother way adding a program (specified by the program path) is using a label, in this case called " MyLabel." You can name the rule anything you wish, and as mentioned above you can complete the program's full path by dragging it to the Terminal window. The following syntax style is appropriate: spctl -add /Path/To/Application.appįor example, to add approval for the imaginary application called “ GooseRoute” that resides in the users downloads folder, the syntax string would look like the following: spctl -add ~/Downloads/GooseRoute.app To add an application to Gatekeeper exceptions and approved application launch list, use the –add flag with spctl to approve an application launch. Typically if you want to have an application launch approved by the GateKeeper feature on a MacOS, you right-click on the unidentified developers application and choose “ Open”, or go through System Preferences to bypass Gatekeeper that way.Īnother option is to manually add application approvals and exceptions to Gatekeeper by turning to the command line in Mac OS X, and for this we will use the included spctl command. You can see this by going to the Security & Privacy preference panel, and under the “ General” section you will not find such an option for Gatekeeper app allow settings. NOTE: The “ Allow applications downloaded from anywhere” option is hidden by default in Gatekeeper for macOS from Sierra onward. When setting up GateKeeper in the Security system preferences, you can set it so that only approved applications from the Mac App Store are allowed to run, additionally allow programs from approved developers to run, or you can set no restrictions and allow everything to run. Gatekeeper is a security measure, introduced in OS X Mountain Lion, that allows the system to prevent the execution of code that does not meet certain criteria, such as possessing a valid digital signature from Apple's developer community.
