Jump to content

Command line arguments ignored

p4 command line login

  • Please log in to reply
2 replies to this topic

#1 SDAlex



  • Members
  • Pip
  • 7 posts
  • LocationCanada (Montreal)

Posted 10 January 2018 - 02:01 AM

Why are the command line arguments ignored?

The command line work from the server. But when i try to login to the server from another computer using the following command:
p4 -u MyUser -H MyServerIP -p 1667 login -p

I get the follow error:


Perforce client error:
        Connect to server failed; check $P4PORT.
        TCP connect to 1666 failed.
        connect: Connection refused

Why it try to use the

I've tried
p4 set P4PORT=1667
p4 set P4HOST=MyServerIP
but it still trying to use

I'm using the macosx version of the p4 command:

Rev. P4/MACOSX105X86_64/2016.2/1468155 (2016/11/28).

#2 Sambwise


    Advanced Member

  • Members
  • PipPipPip
  • 1175 posts

Posted 10 January 2018 - 04:12 PM

P4HOST is for the client hostname (you usually don't need to override this as long as your real hostname doesn't change).  Run:

p4 set P4HOST=
p4 set P4PORT=MyServerIP:1667
p4 set P4USER=MyUser
p4 login

#3 SDAlex



  • Members
  • Pip
  • 7 posts
  • LocationCanada (Montreal)

Posted 11 January 2018 - 07:27 PM

It work! Thanks!

Also tagged with one or more of these keywords: p4, command line, login

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users