[p4] Scripting Login

Stephen Vance steve at vance.com
Thu Jul 6 08:05:55 PDT 2006

You can put the user the scripts run under in its own group with a 
timeout of 0 or a very large number. The 0 value is an infinite timeout, 
but if the user is in multiple groups, it may get sorted as "lower" than 
the other timeout values. This was a bug. I don't know whether it has 
been fixed.

Once you do that, you can login as that Perforce user from the machines 
the script will run on and the login is good effectively forever.

Or you can also use 'p4 login -p' to print the ticket and use it as the 
password in your Perforce commands. Adding the '-a' flag will make it 
valid from all machines.


Vander Werf, Bruce 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
> this?
> --Bruce
> _______________________________________________
> perforce-user mailing list  -  perforce-user at perforce.com
> http://maillist.perforce.com/mailman/listinfo/perforce-user

More information about the perforce-user mailing list