Slide 1
Most trusted JOB oriented professional program
DevOps Certified Professional (DCP)

Take your first step into the world of DevOps with this course, which will help you to learn about the methodologies and tools used to develop, deploy, and operate high-quality software.

Slide 2
DevOps to DevSecOps – Learn the evolution
DevSecOps Certified Professional (DSOCP)

Learn to automate security into a fast-paced DevOps environment using various open-source tools and scripts.

Slide 2
Get certified in the new tech skill to rule the industry
Site Reliability Engineering (SRE) Certified Professional

A method of measuring and achieving reliability through engineering and operations work – developed by Google to manage services.

Slide 2
Master the art of DevOps
Master in DevOps Engineering (MDE)

Get enrolled for the most advanced and only course in the WORLD which can make you an expert and proficient Architect in DevOps, DevSecOps and Site Reliability Engineering (SRE) principles together.

Slide 2
Gain expertise and certified yourself
Azure DevOps Solutions Expert

Learn about the DevOps services available on Azure and how you can use them to make your workflow more efficient.

Slide 3
Learn and get certified
AWS Certified DevOps Professional

Learn about the DevOps services offered by AWS and how you can use them to make your workflow more efficient.

previous arrow
next arrow

Ways to Pass Password in Triggers file in Perforce

Spread the Knowledge

rajeshkumar created the topic: Ways to Pass Password in Triggers file in Perforce
Option 1
If your Perforce server is set to security level 2 or lower you can have your trigger script run as the same user every time (typically a “background” user). Then, either have the server’s P4PASSWD environment variable set to the background user’s password,

Option 2
You can also use the -P flag to specify the password with the P4 commands issued by the script.

Option 3
You can echo the password and pipe it to the login command. Note that there is no space between the password and the pipe symbol.
echo | p4 login

Option 4
If you do not want to place a password in the script, you can use a text file containing the password. Make sure this password file has appropriate read and write privileges.
p4 login < password.txt Option 5 A more secure method is to use ticket based authentication and a group to keep a background user "logged in" at the Perforce server: 1. Create a group: p4 group always_on 2. Add your background user to the "Users" field. 3. Change the timeout from the default setting (12 hours), which is set in seconds. The new value depends on the server version: # 2008.1 and later: Set this value to "unlimited". A timeout value of zero is no longer accepted. # 2005.1 to 2007.3: Set this value to zero. # 2004.2 and earlier: Set this to a very large value -- but not too large, as some server versions do not handle situations where the timeout is set to exceed the "Unix Epoch", which is approximately in the year 2038. A safe value is 315532800 seconds, which is about 10 years. # Save the group. # In your trigger script, log the background user in and run the trigger once. echo password| p4 -p server:port -u username login # If the trigger runs properly, you can remove the password line. The user now remains logged in. Since this is ticket based authentication, they remain logged in even if the server is shut down or the hardware is rebooted. Regards, Rajesh Kumar Twitt me @ twitter.com/RajeshKumarIn

Rajesh Kumar