How to access command line on my VPS?
Posted 12 July 2020 - 01:01 PM
So, I managed to set up perforce on a VPS I recently started renting.
As I know nothing about Linux, I had to follow a step by step tutorial:
https://allarsblog.c...<br /> <br /> this worked just find and I was set up within minutes.
I could also connect to that server using the P4V Visual client and start adding stuff to the depot etc.
For some specific actions, like adding a p4 typemap, I will probably still have to use command line, but I can´t figure out how to do this on the VPS.
Connecting to the VPS via putty and then just typing in "p4 typemap" just gives me an error "p4: command not found".
Am I missing a step in the above mentioned blog, to gett access to those commandline commands?
Or do I need to change directory, after connecting as "root"?
Posted 12 July 2020 - 02:56 PM
Posted 12 July 2020 - 04:57 PM
I already tried that.
Windows+r, cmd, type in some command like p4 typemap.
I immediately get an error saying
Perforce client error:
Connect to server failed, ceck $p4port.
As this worked before I installed the remote VPS server, when I was just connecting to localhost:1666, I wonder what I have to do differently now.
I´m checking the docs again, but I didn´t have luck yet.
Posted 12 July 2020 - 05:18 PM
p4 set p4port=your.vps.host:1666
but replace your.vps.host:1666 with the right value. (Same server port you use to connect with P4V.)
You may also need to do:
p4 set p4user=your.user.name p4 set p4client=your.workspace.name
p4 set is persistent so you'll only need to do this once.
Posted 12 July 2020 - 05:29 PM
Perforce client error:
Connect to server failed; check $P4PORT.
Execution Failed: p4d.exe -i -J off -r "c:Users\samue\.p4root": The system cannot find the file specified
Posted 12 July 2020 - 06:04 PM
If you aren't using a string like that to connect from P4V, P4V isn't actually connected to your VPS...
Posted 12 July 2020 - 06:30 PM
I also just found something weird:
If I go to the P4V and right click on the depot, I have an option to "open commandline here".
If I click on that, I get a commandline in that workspace directory (C:Perforce/Project) and...
If I type in p4 commands here, it actually works!
So, I reopend the commandline from windows, using "Windows+r", typing in "cmd".
Apparently I was in the path of "C:\Users\myusername"
So I went up to the windows root folder, by typing in "cd \"
And now, if I type in any p4 commands...it actually works...
Does that make sense, or do you think I´m not connected?
How can I check for that?
Posted 12 July 2020 - 06:44 PM
C:\Perforce\test>p4 set P4CHARSET=none (config 'c:\Perforce\test\p4config.txt') P4CLIENT=Samwise-dvcs-1509687817 (config 'c:\Perforce\test\p4config.txt') P4CONFIG=p4config.txt (set) (config 'c:\Perforce\test\p4config.txt' ) P4EDITOR=notepad (set) P4IGNORE=p4ignore.txt (config 'c:\Perforce\test\p4config.txt') P4INITROOT=c:\Perforce\test (config 'c:\Perforce\test\p4config.txt') P4MERGE=vsmerge.bat (set) P4PORT=rsh:p4d.exe -i -J off -r "c:\Perforce\test\.p4root" (config 'c:\Perforce\test\p4config.txt') P4USER=Samwise (config 'c:\Perforce\test\p4config.txt')
Most of the settings here are coming from a P4CONFIG file that's in the working directory. If I go to a directory where there's no P4CONFIG file then I just get the values that I've set with "p4 set":
C:\>p4 set P4CONFIG=p4config.txt (set) (config 'noconfig') P4EDITOR=notepad (set) P4MERGE=vsmerge.bat (set) P4PORT=1777 (set) P4USER=bob (set) P4_1777_CHARSET=none (set)
Posted 12 July 2020 - 06:54 PM
Since I first installed p4V to test it out locally, I guess the settings where still in the system.
So, using "p4 set" in the local user directory, I get the local stuff, which isn´t working anymore.
If I use "p4 set" in the C root directory, I get all the data like my vps ip etc.
Posted 12 July 2020 - 06:55 PM
Posted 12 July 2020 - 07:00 PM
Test that the VPS is running with the "p4 info" command. That asks the server to send you information about itself and about how you're connected to it -- if the server isn't running, you'll get a connection error.
C:\Perforce\workshop>p4 info User name: sam_stafford Client name: samwise-compy386 Client host: COMPY386 Client root: c:\Perforce\workshop Current directory: c:\Perforce\workshop Peer address: 126.96.36.199:62670 Client address: 188.8.131.52 Server date: 2020/07/12 12:00:56 -0700 PDT Server version: P4D/LINUX26X86_64/2020.1/1953492 (2020/04/24) ServerID: guru_master Server services: standard Server license: Licensed Case Handling: sensitive
Posted 12 July 2020 - 07:06 PM
Thanks again, if I can do anything for you apart from taking up your time, please let me know...
I mean, I like being helpful in the areas I´m good at, but you probably don´t wanna learn particle dynamics in 3ds max...
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users