Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PermissionError: [WinError 5] Access is denied #103

Closed
hugomrdias opened this issue Jun 28, 2013 · 12 comments
Closed

PermissionError: [WinError 5] Access is denied #103

hugomrdias opened this issue Jun 28, 2013 · 12 comments

Comments

@hugomrdias
Copy link

i get this error running ST3 on Windows 7

Traceback (most recent call last):
  File "C:\Program Files\Sublime Text 3\sublime_plugin.py", line 526, in run_
    return self.run()
  File "C:\Users\Hugo\AppData\Roaming\Sublime Text 3\Installed Packages\GitGutter.sublime-package\git_gutter.py", line 34, in run
  File "C:\Users\Hugo\AppData\Roaming\Sublime Text 3\Installed Packages\GitGutter.sublime-package\view_collection.py", line 36, in diff
  File "C:\Users\Hugo\AppData\Roaming\Sublime Text 3\Installed Packages\GitGutter.sublime-package\git_gutter_handler.py", line 150, in diff
  File "C:\Users\Hugo\AppData\Roaming\Sublime Text 3\Installed Packages\GitGutter.sublime-package\git_gutter_handler.py", line 166, in run_command
  File "X/subprocess.py", line 818, in __init__
  File "X/subprocess.py", line 1096, in _execute_child
PermissionError: [WinError 5] Access is denied
@abiramipattar
Copy link

I Get the same error too..Any solutions?

@dornfeder
Copy link

same here...

1 similar comment
@cyrusdavid
Copy link

same here...

@biin
Copy link

biin commented Nov 12, 2014

Same here..
no Solution ???

@jmcbee
Copy link

jmcbee commented Nov 12, 2014

I solved it.

@jisaacks
Copy link
Owner

@fbm-static Care to share with the rest of us, how you solved it?

@rushfly
Copy link

rushfly commented Oct 29, 2015

First, I removed gitgutter through package control.
Then deleted all files in the directory of "Data\Packages\User\Package Control.cache" after close sublime.
Run again and reinstall gitgutter, it's works!

@jisaacks
Copy link
Owner

@rushfly thanks for the update. Can someone else confirm this solves it for them too?

@danicoolpak17
Copy link

Dear All,

I was having the same error over and over again in ST3. I was trying to install AdvancedNewSideBar plugin and this error showed up over and over again.

I tried this and it worked perfectly with me. Right click on ST3 ,(icon) or from installation dir ,open properties and set compatibility to your window version and them click on always run as administrator (I choose run as administrator for all users).

Thanks
Dani

@geedew
Copy link

geedew commented Sep 1, 2016

@jisaacks Confirmed that it does not work (removing and wiping cache).

This continues for me on Windows 10, ST3

@hsandt
Copy link

hsandt commented Nov 5, 2016

I solved the problem by changing my GitGutter User preferences. In my case, the git binary path was wrong, not including the filename itself. It was set to C:\Program Files (x86)\Git\bin instead of C:\Program Files (x86)\Git\bin\git.exe.

Open User\GitGutter.sublime-settings (Preferences > Package Settings > GitGutter > Settings - User):

{
  "git_binary": "C:\\Program Files (x86)\\Git\\bin\\git.exe"  // replace with your own path, including .exe
}

Long story:

After looking at the source code (git_gutter_handler.py), I searched on issues with Python subprocess.Popen and found a fix on http://stackoverflow.com/questions/3005437/windowserror-error-5-access-is-denied, some answers recalling you to call subprocess.Popen with the executable full path. By printing the arguments of Popen I realized that GitGutter really needs you to define the full executable path of git.

#191 and #178 (comment) also refer to the git_binary setting, used as argument for Popen.

@rchl
Copy link
Collaborator

rchl commented Nov 16, 2016

Seems like a problem with wrong git_binary path. Closing.

@rchl rchl closed this as completed Nov 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests