cipd.ps1 cannot be loaded.
执行gclient
出现如下错误:
File C:\depot_tools\cipd.ps1 cannot be loaded. The file C:\depot_tools\cipd.ps1 is not digitally signed. You cannot run this script on the current system. For more information about runnin
g scripts and setting execution policy, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
+ CategoryInfo : SecurityError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : UnauthorizedAccess
解决方法:
运行gpedit.msc
打开组策略,导航到Computer Configuration | Administrative Templates | Windows Components | Windows PowerShell ,将Turn On Script Execution设置为Enable,Allow all scripts。
参考文档:
- Set the PowerShell execution policy via Group Policy - TechRepublic
- Powershell is not digitally signed: Set-ExecutionPolicy - Concurrency
- Change the PowerShell MachinePolicy Execution Policy in WS 2012R2
- PowerShell on Windows 7: Set-ExecutionPolicy for regular users - Stack Overflow
- ExecutionPolicy script is not recognized as an internal or external command · Issue #35 · felixrieseberg/npm-windows-upgrade
- about_Execution_Policies
- Get ExecutionPolicy
- Set ExecutionPolicy