Jump to content


Login to Perforce from Commandline

command-line cmd perforce

  • Please log in to reply
1 reply to this topic

#1 Luke15

Luke15

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 20 August 2019 - 10:49 AM


I would like to login to Perforce(P4) from the command line. I tried using

p4 -u My_Username login

But how do I provide the password. I need this to check-in a file from the command line.


#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 979 posts

Posted 21 August 2019 - 09:15 PM

First: instead of doing "-u My_Username" on every command, do:

p4 set P4USER=My_Username

Now you can just run:

p4 login

It will give you a prompt ("Enter password:" or something like that).  Type in your password and push the Enter key.





Also tagged with one or more of these keywords: command-line, cmd, perforce

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users