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

Jonathan Soifer picture Jonathan Soifer · Nov 24, 2015 · Viewed 21.8k times · Source

The system is a Mac OS X El Capitan running Sublime Text 3.

I was perfectly able to run ST3 from the terminal, using the symbolic link by typing "subl". I have no idea what could have possibly changed.

Now everytime I try to start subl from the terminal in any given directory (by running "subl .") I get a "Permission Denied" window every 5 seconds.

[Sublime opens the specified directory, whichever it is, and then everytime I switch back to ST3, the window pops up "Permission Denied"]

The only message in ST's console is: "error: Permission denied".

When opening Sublime Text from the GUI (not CLI), this doesn't happen at all.

Answer

Alisher Musurmonv picture Alisher Musurmonv · Sep 9, 2017

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.