p4 login
Synopsis
Log in to a Perforce server by obtaining a ticket.
Syntax
p4 [g-opts] login [ -a -p ] [ user ]
p4 [g-opts] login [ -s ]
Description
The p4 login command authenticates a user and creates a ticket that represents a session with a Perforce server. Once authenticated, a user may access the Perforce server until either the ticket expires or until the user issues the p4 logout command.
By default, tickets are valid for 12 hours, and only for the IP address of the workstation of the user that issued the p4 login 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.
Options
-a
|
Obtain a ticket that is valid for all IP addresses.
|
-p
|
Display the ticket, rather than storing it in the local ticket file.
|
-s
|
Display the status of the current ticket, if one exists.
|
g-opts
|
See the Global Options section.
|
Usage Notes
Can File Arguments Use Revision Specifier?
|
Can File Arguments Use Revision Range?
|
Minimal Access Level Required
|
---|
N/A
|
N/A
|
list
|
- The default timeout value of 43200 seconds (12 hours) is defined on a per-group basis in the p4 group form.
- To create tickets that do not expire, set the timeout value to 0 in the p4 group form.
- 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 may obtain login tickets for users other than themselves without entering passwords. Non-superusers may obtain tickets for other users if and only if they 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.
Examples
p4 login
|
Prompt the user for a password; if the password is entered correctly, issue a ticket valid on the user's machine.
|
p4 -u builder login -a
|
Attempt to log in as user builder; if the password is entered correctly, issue a ticket valid on all machines.
|
Related Commands
Please send comments and questions about this manual to
[email protected].
Copyright 1999-2007 Perforce Software. All rights reserved.
Last updated: 05/21/07