Using TortoiseGit on admin folders
Asked Answered
R

0

8

Can tortoise git be configured to use admin privileges on Windows?

Background: I work with project on Windows that is maintained with git, however with the project is compiled the build process sets the folder it is cloned to is set to an administrative folder in windows due to reasons beyond my control (tools that are compiled only work in admin mode). This creates an issue in that the contents of the folder that is cloned, and the .git subdirectory and all it's children are not writable to the normal user, unless the user elevates to admin temporarily.

Rather than prompting to use 'admin' tortoise git seems to just bomb out and report that the files cannot be changed as they are read-only.

Is there a way to get tortoise git to either use admin privileges all the time, or at least prompt to use admin if necessary?

Rorrys answered 16/1, 2020 at 14:14 Comment(6)
Have you tried to grant more permissions to the filesystem? Does setting TortoiseGitProc.exe to "run always as administrator" in explorer properties help?Baculiform
Setting TortoiseGitProc.exe to always run in administrator actually disables the 'right-click' git functions from the explorer menu in so much that then when I try to run something, like git pull, I get an error "The requested operation requires elevation" but am never prompted to provide elevation.Rorrys
What do you mean by "administrative folder"?Baculiform
(note : not a Windows man here) can you open a file explorer with administrator privileges ? if yes, are git commands issued from TortoiseGit in this explorer also executed with admin privileges ?Flail
Any solution for this? I've tried various things myself but nothing works... :(Bog
Another workaround to add a Full control for "Everyone" on admin folder though it's not safe, at least I could successfully create a repo in C:\inetpub\wwwroot (make sure to set Owner as Administrators).Vivianviviana

© 2022 - 2024 — McMap. All rights reserved.