title: "Perforce password (P4PASSWD) invalid or unset" in Jenkins, from execute shell command
body: <p>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?</p>
  
  <p>Execute shell:
  p4 -P %P4TICKET% edit ...</p>
  
  <p>Log:</p>
  
  <p>[JobName] $ /usr/bin/p4 login -a -p</p>
  
  <p>...</p>
  
  <ul>
  <li>p4 -P %P4TICKET% edit ...</li>
  </ul>
  
  <p>Perforce password (P4PASSWD) invalid or unset.</p>