[p4] Scripting Login
p4shawn at gmail.com
Thu Jul 6 07:41:34 PDT 2006
The following command will log you in from a batch script.
echo password|p4 login
Make sure there is exactly one space between echo and password, and no
spaces between password and the pipe.
However, I don't recommend this approach. If you have a script running on a
schedule, it should use a dedicated user login for that purpose. That user
should have limited rights, and a very long timeout for the ticket. That
way you can manually log the user in once, and never have to worry about the
timeout or hard-code the password.
On 7/6/06, Vander Werf, Bruce <bvanderwerf at crownintl.com> wrote:
> I have several scripts (MSDOS batch files) I use to manage tasks on two
> different Perforce servers. Where I get hung up is on the login. If I
> haven't logged in to a server for 12 hours, a login is required and my
> scripts fails. I haven't been able to figure out how to automate the
> login process, at least not with batch files. Anyone have any ideas on
> perforce-user mailing list - perforce-user at perforce.com
More information about the perforce-user