I tried running following command through console and got an error
Command : p4 sync //depot/somepath/ [Event tried with -u < username >]
Error : User < username > doesn't exists.
Same thing is working fine with perforce visual client.
I think you just need to do some p4 configurations such as:
P4PORT
P4USER
P4PASSWD
P4CLIENT
First, run the following in your terminal:
p4 info
Verify if the information match the same info that you have in the GUI version.
Then set the credentials for the followings (In my case I only had to set my user and password):
p4 set P4PORT=server.example.com:1666
p4 set P4USER=username
p4 set P4PASSWD=password123
p4 set P4CLIENT=client-dev
Once you have all your entries set, just type:
p4 login