简体   繁体   English

gh:在 Jenkins 管道中找不到命令

[英]gh: command not found in Jenkins pipeline

I am trying to run below command in Jenkins pipeline我正在尝试在 Jenkins 管道中运行以下命令

$ gh pr create --title "The bug is fixed" --body "Everything works again"
$ gh pr create --reviewer monalisa,hubot  --reviewer myorg/team-name
$ gh pr create --project "Roadmap"
$ gh pr create --base develop --head monalisa:feature

Getting error gh: command not found where general git command are working fine like git checkout -f fedb73c252b8f058a83ab222648c08265f442876 is there any way to fix this issue?出现错误gh: command not found where general git command is working fine like git checkout -f fedb73c252b8f058a83ab222648c08265f442876有什么办法可以解决这个问题?

git is part of every linux install and as such is available in /usr/bin/git via most default PATH. git是每个 linux 安装的一部分,因此可以通过大多数默认路径在/usr/bin/git中使用。 gh is Github CLI and may not have been installed on the node running your pipeline. ghGithub CLI ,可能尚未安装在运行管道的节点上。 Or, if installed , as the jenkins agent process launches via non-interactive shell , is not likely to be available in the default PATH.或者,如果已安装,由于 jenkins 代理进程通过非交互式 shell启动,因此在默认路径中不太可能可用。

You'd have to check your installation/configuration to determine the next steps.您必须检查您的安装/配置以确定后续步骤。 A quick fix if installed is prepend the /full/path/to/gh (Not a gh user, so won't provide guidance beyond the above).如果安装了快速修复,则在/full/path/to/gh之前添加(不是 gh 用户,因此不会提供上述以外的指导)。

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM