OK I admit it - I HATE CVS. It is a kludgy mess and anyone that has used it. I like the comment from this article which states
"CVS was designed by hamsters on crystal meth."
Well if your a sole hacker and want something to use personally that's FREE - use perforce it'll save you time and energy. And you won't have UGLY CVS files all over the place - Yuck.
I will install this the sysadmin way - and allow ssh tunneling to occur so I can limit who has access to my repository
For the purposes of this I am going to make the following assumptions..
1.) You develop something that you would like to have version control over. That something is represented by 1's and 0's and can be seen on a computer screen.
2.) You have access to a Linux Machine. (Not necessary but for this install yes it is - and NO I won't help you on your windows box )
3.) You have a connection to the internet.
4.) You have some brains - they help :)
Ok, that's outa the way. Check out the following links.
So go get perforce. Pull p4 p4d (if you want p4v too)
Install it by doing the following:
# cp p4 /usr/local/bin/
# chmod 755 /usr/local/bin/p4
# cp p4d /usr/local/bin/
So that was easy - now let's get a perforce user and group defined..
# groupadd -g 500 perforce
# adduser -u 500 -g perforce -d /home/depot -s /bin/false perforce
Now let's put this in the local start up scripts as a daemon..
start-stop-daemon --start --quiet --chuid perforce:perforce \
--exec /usr/sbin/p4d \
-- -q -L /var/log/perforce \
-J /mnt/local/perforce/journal \
-p 1667 -d -r /home/depot
Ok then kick it over.. See her start up -- voila!
Now using p4v attempt to connect to localhost:1666 If you can your in business!!
Now let's get some authentication going.. First things first - p4 protect to set up basic protections
# p4 protect
Modify it so only user foo can write to my repository..
Protections:
write user foo * //...
super user root * //...
And save the file. This gives superuser access (root) and foo has (write) access. Now let's limit how we gain access from outside of our network..
Creating an ssh port forwarder.. On our client run the following:
ssh <linux-box> -L 1666:localhost:1667
This sets up a secure tunnel to the remote 1667 port using my local 1666 port. Way cool. Now I can connect to it anytime I want to from outside my network.
Now what makes it easier is to add the following to your ~/.ssh/config file
Host tunnel
User <user-name>
Hostname <linux-box>
LocalForward 1666 localhost:1667
GatewayPorts no
Now in the future all I have to do type ssh tunnel and the tunnel is created!! Once this is created now you simply connect to the localhost port 1666 and it magically and securely heads over to the the linux box! Way cool!
Or if you run a mac pull this cool little app!
OK enough for today.
Posted by Steven at February 25, 2005 10:00 PM | TrackBack