Starting from macOS 15, sudo spctl --master-disable is no longer supported to disable Gatekeeper.
We need to disbale it with Configuration Profiles.
- Create a new configuration profile, an XML file with
.mobileconfigextension, refer the sample file in this gist - replace the UUID with your own, you can use
uuidgenin terminal to generate a new one - 2 UUIDs are required, one for the profile and one for the payload
- double click the
.mobileconfigfile to install the profile on your Mac - in system pereferences -> device management, click to open the profile and enable it
- restart the Mac
You can see in Sysytem Settigns -> Security & Privacy, allow applications from Anywhere is set.
Another round of completely useless conversation
This is exactly what "not working via CLI" means, which is what I was asking about initially. It's clear you're having troubles reading plain text, but screenshots seem to work better on you for some reason, so here goes:
Now, as comforting as it is to keep proving things to random people on the Internet — especially to the ones with such impeccable attention to details as you've demonstrated above — I suggest that we steer the conversation into more constructive manner. Which is: unless you know how to disable Gatekeeper via CLI only (e.g. so that you can provision 300 hosts, say, with Ansible or ssh without having to click buttons in System Preferences), please don't bother me or anyone in this thread.
Thank you very much for your understanding.