gpt4 book ai didi

amazon-web-services - 由于 amplify.ps1 安全问题,命令 "amplify configure"无法运行

转载 作者:行者123 更新时间:2023-12-05 06:08:34 26 4
gpt4 key购买 nike

我正在使用 aws amplify 并尝试在我的根目录中运行命令“amplify configure”,但一直收到此错误响应

amplify : File C:\Users\munet\AppData\Roaming\npm\amplify.ps1 cannot be loaded. The file C:\Users\munet\AppData\Roaming\npm\amplify.ps1 isnot digitally signed. You cannot run this script on the currentsystem. For more information about running scripts and settingexecution policy, see about_Execution_Policies athttps:/go.microsoft.com/fwlink/?LinkID=135170. At line:1 char:1

  • 放大配置
  • >
      + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

我尝试在 powershell 中解锁文件,但它仍然显示相同的错误。我什至转到我的 AppData 文件夹中的文件,单击属性,然后选中标记取消阻止的选项不是一个选项。我想知道还有什么可能阻止该文件运行。我想我必须对脚本进行数字签名,但不确定在哪里。这是解决方案可能所在位置的链接。如果找到,我会上传解决方案。谢谢。

https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies?view=powershell-7.1#remotesigned

最佳答案

这个问题的解决方案相当简单。您正在 Powershell 中运行此命令。有时以管理员身份运行 powershell 会有所帮助,但最好的解决方案是在命令提示符 (cmd)

中运行它

关于amazon-web-services - 由于 amplify.ps1 安全问题,命令 "amplify configure"无法运行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65112330/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com