本文介绍了"Perforce密码(P4PASSWD)无效或未设置"在詹金斯,从执行外壳命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个詹金斯(Jenkins)工作,并且似乎正确设置了perforce.但是,当我尝试在jenkins的执行外壳中使用p4命令时,出现错误"Perforce密码(P4PASSWD)无效或未设置".以下是execute Shell和日志,我应该怎么做才能使其正常工作?

I have a Jenkins job and it seems to have perforce set up correctly. However, when I tried to use p4 command in the execute shell of jenkins, got an error "Perforce password (P4PASSWD) invalid or unset". Following is the execute shell and log, what should I do to make it work?

执行shell:p4 -P%P4TICKET%编辑...

Execute shell:p4 -P %P4TICKET% edit ...

日志:

[JobName] $/usr/bin/p4 login -a -p

[JobName] $ /usr/bin/p4 login -a -p

...

  • p4 -P%P4TICKET%编辑...

Perforce密码(P4PASSWD)无效或未设置.

Perforce password (P4PASSWD) invalid or unset.

推荐答案

尝试使用$ {P4TICKET}而不是%P4TICKET%.严格来说,%VARIABLE%"是Windows的约定,在UNIX中不能用于引用变量.

Try ${P4TICKET} instead of %P4TICKET%. "%VARIABLE%" is strictly a Windows convention, and doesn't work in unix for referencing variables.

这篇关于"Perforce密码(P4PASSWD)无效或未设置"在詹金斯,从执行外壳命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-25 08:45