How to solve Permission Denied when running Sublime Text 3 from the terminal?

If you have installed Git for Sublime 3 it causes an error and popup "Permission Denied" If you deleted any project file or folder that has been hosted in github.

Solution: Delete the Git package and reinstall it. You can do

cmd+shift+p and select "Package Control: Disable Package" and select Git

Hope it helps.


Disable csrutil by rebooting in recovery mode (cmd + r on startup) then Utilities > Terminal

csrutil disable

then reboot your mac as you normally would. csrutil should do it but I have heard others supposedly needed to disable gatekeeper as well...

Disable gatekeeper in terminal with:

sudo spctl --master-disable