SVN+SSH

Setup SSH access
Go to the cPanel “Manage SSH Keys”, click the “Generate Key” button to generate a pair of keys.
Go back in the “Manage SSH Keys”, Authorization the public key you just generated and download the private key to your local machine.
Let’s say, we want to name the private key file “.id_rsa”. So, copy the download file to “~/.ssh/.id_rsa” and set correct permission on it.
1 chmod 400 ~/.ssh/.id_rsa

Connect from the Terminal to verify it works.
1 ssh [email protected] -i .ssh/.id_rsa

Install subversion on the server

I’m using InMotionHosting. Their business hosting plan on edge server has subversion installed. Another so called “developer friendly” hosting company that I know is A2 hosting. BlueHost, MonsterHost and GoDaddy are few that I know people have success installed subversion on them.

Create subversion repositories

Suppose I want to layout my repositories like this: ~/svn/repo1/project1, ~/svn/repo1/project2, ~/svn/repo2/project3, …, This is what I do after ssh logon to my server in Terminal:

12 mkdir svn svnadmin create svn/repo1

Setup Xcode

Select SCM->Configure SCM Repositories…, go to the SSH tab. You should see the private key file is listed there. If it’s not authorized, type the passphase (the one you typed when generate the key pair) to authorize it.
In the Repositories tab, you should configure it similar to this:
SVN+SSH_第1张图片

3.If you’re not sure about the path, type pwd in the Terminal which should print out your path.
4.Select SCM->Repositories, and select the repository you just configured, the ‘project1′ directory should be listed there. Now you can import your source files into the repository.
5.To obtain a working copy, select Checkout in the above Repositories dialog.
6.Now open the Xcode project file you’ve checked out. If it’s SCM not configured, select menu Project->Edit Project Settings…, in the General tab, click “Configure Roots & SCM…”.

SVN+SSH_第2张图片

【http://blog.iosplace.com/?p=4】

你可能感兴趣的:(SVN)