Diciamo che ho un branch git in "C:/Temp"
Eseguo da python:
shutil.rmtree(os.path.normpath('C:/Temp'))
WindowsError: [Error 5] Access is denied 'C:\\Temp\\.git\\objects\\1e\\f76021ac8cc0120a5ebd74530d602bff8f81c4'
"C:\Program Files\Oracle\VirtualBox\VBoxManage" guestcontrol "nome guest" execute --image "C:\\gitroot\\CI\\build.bat" --username standard --wait-exit --wait-stdout --wait-stderr -- -b development"
E lo username "standard" è quello che può tranquillamente rimuovere il file a manina.