The p4 login command authenticates a user and creates a ticket that represents a session with a Perforce server. Once authenticated, a user can access the Perforce server until either the ticket expires or until the user issues the p4 logout command.To obtain a ticket valid for all IP addresses (for instance, to use Perforce simultaneously on more than one machine), use p4 login -a. Users with tickets that are valid for all IP addresses still consume only one Perforce license.
Obtain a ticket that is valid for all IP addresses. See the Global Options section.
Can File Arguments Use
Revision Specifier? Can File Arguments Use
Revision Range? Minimal Access Level Required
•
•
• To extend a ticket's lifespan, use p4 login while already logged in. Your ticket's lifespan is extended by 1/3 of its initial timeout setting, subject to a maximum of your ticket's initial timeout setting.
• Perforce superusers can obtain login tickets for users other than themselves without entering passwords. Non-superusers who attempt to log in as other users must use the p4 -u username login form of the command, and correctly supply the other user's password.
• Tickets are stored in the file specified by the P4TICKETS environment variable. If this variable is not set, tickets are stored in %USERPROFILE%\p4tickets.txt on Windows, and in $HOME/.p4tickets on other operating systems.
Prompt the user for a password; if the password is entered correctly, issue a ticket valid on the user's machine. Attempt to log in as user builder; if the password is entered correctly, issue a ticket valid on all machines.