【问题标题】:NuKeeper unable to find executable gitNuKeeper 找不到可执行的 git
【发布时间】:2022-09-24 02:35:46
【问题描述】:

我正在尝试使用 NuKeeper,它通过 azure 管道更新项目中的包。 但是我不断得到:

##[error]Error: Unable to locate executable file: \'git\'. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also verify the file has a valid extension for an executable file.

我不确定错误发生在哪里。 我已经在没有 NuKeepr 的情况下测试了管道,它很好。

我已经按照这里的步骤https://www.c-sharpcorner.com/article/automate-nuget-package-upgrade-in-azure-pipelines/

我的代理是这样配置的https://www.youtube.com/watch?v=sjCOc4g-AdY

  • 您使用的是自托管代理还是私人代理?
  • azure dev ops 在我们的私人服务器上,我添加了代理并通过 powershell 进行配置。所以自托管。
  • 错误消息非常清楚问题是什么。请说明您尝试进行的故障排除。即您是否确保将 Git 安装在您的私有代理上并添加到 PATH 环境变量中?
  • PS C:\\WINDOWS\\system32> @@@@@@ cd C:\\AzureDevOpsAgents\\Agent#1 @@@@@@ PS C:\\AzureDevOpsAgents\\Agent#1> git --version @ @@@@@ git version 2.14.4.windows.2 @@@@@@ 在运行 git 命令后我得到了 git 版本

标签: azure-pipelines


【解决方案1】:

好的,一旦在系统 PATH 环境变量中添加 git.exe 文件夹的路径。

您还必须重新启动机器,否则尽管它识别出 cmd 中的路径,但在 Azure dev ops 管道中仍然找不到


编辑:原来 nukeeper 包在使用自托管的 azure devops 时存在错误(url 的名称中不包含 azure)

我改为使用 dotnet 过时的工具来更新软件包

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2016-04-26
    • 2020-09-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-16
    • 2012-08-06
    • 1970-01-01
    相关资源
    最近更新 更多