-
-
Notifications
You must be signed in to change notification settings - Fork 337
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
[Bug]: pyRevit_CLI_4.8.15.24089_admin_signed shows "repository path is not owned by current user" for private extensions using elevated ps1 script #2191
Comments
Do you have a possible solution to propose? a fix to the code base? |
that's a different one IMHO |
so I just had to relearn what windows ACL and SID's are. But I was able to fix this error by calling a second powershell script that changes the ACL of the extension folder and the .git folder from the admin account (from elevated script) back to the user account (script checks for the active user account). This is for Active Directory. Not sure if this would be different for regular user accounts here is the script. update the paths to your ".extension" folder and ".extension.git". change-owner.ps1
I added a second line to my bat file that elevates to admin to call this second powershell script (didn't work when I added to the end of the install script)
I'll try and dig it more and see what can be done. looks like there are open PR's from a year ago to implement in LibGit2Sharp though |
Thanks for reporting back and explaining your digging. |
I guess we can close this out since its not issue with pyRevit, although at least there is a workaround. If that PR ever gets merged in LibGit2Sharp then maybe we can implement a solution on pyRevit side. |
✈ Pre-Flight checks
🐞 Describe the bug
Previously used 4.8.8 CLI installer, and then pyRevit_CLI_4.8.15.24043_admin_signed.exe (WIP installer from develop-4) and was able to install on multiple users computers without issue using an elevated powershell script
Using the latest pyRevit_CLI_4.8.15.24089_admin_signed.exe, the "pyrevit extend ui ...." command will clone the repo without issue, but when Revit is started it will show an error "repository path xxxxxxx is not owned by current user".
This was a git change in response to CVE-2022-24765
At first I was unable to reproduce this issue because I have git installed and have the extension repo path set as a [safe] directory.
Once I removed the [safe] directory from my gitconfig, I would get the same issue. Deleting the extension folder and running the exact same "pyrevit extend ui ....." command from a NON-elevated command prompt will clone the repo and Revit will be able to load the extension without issue.
So non-admin script does not need [safe] directory set, but admin does. None of our other users can set a [safe] directory as they do not have git installed.
⌨ Error/Debug Message
"repository path xxxxxxx is not owned by current user"
♻️ To Reproduce
To reproduce error:
you can check by running
remove any path after "safe.directory="
To reproduce fix
Delete the extension folder
Run the exact same command in cmd.exe (non admin) except replace the variables with the actual values
⏲️ Expected behavior
Revit should open without an error
🖥️ Hardware and Software Setup (please complete the following information)
The text was updated successfully, but these errors were encountered: