简体   繁体   English

Bower - enogit git 未安装或不在 PATH 中

[英]Bower - enogit git is not installed or not in the PATH

I get following error when my Jenkins build runs:当我的 Jenkins 构建运行时,我收到以下错误:

"ENOGIT git is not installed or not in the PATH"

However there is no error when I run it from cmd.但是,当我从 cmd 运行它时没有错误。

The key difference is that one of bower packages uses git:// protocol instead of https:// like other packages do.关键的区别在于 bower 包之一使用git://协议而不是像其他包那样使用https:// I tried to override it in git config to use http:// instead of git:// but no luck, Git is also in a PATH .我试图在 git config 中覆盖它以使用http://而不是git://但没有运气,Git 也在PATH

Any ideas how to make it work, one of the solutions would be to make bower download package using https:// not the git:// is that possible?任何想法如何使它工作,解决方案之一是使用https://而不是git://制作凉亭下载包,这可能吗?

That error is not related to protocol.该错误与协议无关。 For some reason or another, git executable is not found in the path for your jenkins job.出于某种原因,在您的 jenkins 作业的路径中找不到 git 可执行文件。 This is different from your user path and system path, so even if it is in those, it seems it is not in jenkins job path.这与您的用户路径和系统路径不同,因此即使在这些路径中,似乎也不在 jenkins 工作路径中。

You can confirm this by running a shell script as a build step and trying to use git there.您可以通过运行 shell 脚本作为构建步骤并尝试在那里使用 git 来确认这一点。

You can also try echoing/setting the path before you call bower to troubleshoot/work around the problem.您还可以在调用 bower 来解决/解决问题之前尝试回显/设置路径。

经过一些回声后,我发现运行 Jenkins 的用户在路径中没有 GIT(系统用户),因为我找不到在该用户下登录并编辑 PATH 变量的方法,我重新启动了服务器,它开始像我一样工作预期的。

You should check PATH in environment variables.您应该在环境变量中检查 PATH。 And if path has not location of git... then paste this into PATH :如果路径没有 git 的位置...然后将其粘贴到 PATH 中:

C:\Program Files\Git\bin;C:\Program Files\Git\cmd

And restart gitbash,cmd or jenkin build cmd.并重新启动 gitbash,cmd 或 jenkin build cmd。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Bower:ENOGIT Git 未安装或不在 PATH 中 - Bower: ENOGIT Git is not installed or not in the PATH 在 Gitbash - Bower 上:ENOGIT git 未安装或不在 PATH 中 - - On Gitbash - Bower : ENOGIT git is not installed or not in the PATH -- 在Gitbash - Bower:在PATH中没有安装或不安装ENOGIT git - On Gitbash - Bower : ENOGIT git is not installed or not in the PATH 凉亭寄存器错误ENOGIT git未安装或未在路径中 - bower register error ENOGIT git is not installed or not in the path ENOGIT git未安装或不在路径中 - ENOGIT git is not installed or not in the path Bower-使用Symfony Process在PATH中未安装或未安装ENOGIT git - Bower - ENOGIT git is not installed or not in the PATH using Symfony Process 尽管git在用户路径中,但“未安装ENOGIT git或PATH中未安装git” - “ENOGIT git is not installed or not in the PATH” although git is in the user's path Bower“Git not in the PATH”错误 - Bower “Git not in the PATH” error 即使安装了git和stackoverflow中给出的路径变量后,在安装Bower组件时也会“未安装Git或未指定路径” - 'Git not installed or path not specified' while installing bower components even after having git & the path variables as given in stackoverflow 如何找到已安装的“ git”包的路径 - How to find the path of an installed “git” package
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM