By Mike Hubbartt, © Copyright 2011, All Rights Reserved.
In the old days, developers used file system directories with customer naming conventions to organize their code and support files. This was a problem if the files were stored locally and the computer hard drive failed, and it made it difficult to keep code in sync when other developers had local versions of code that may have changes that impacted other areas of a program. Some companies used file servers to store source code, but again it could be difficult to keep source code synced if developers made local changes and forgot to update the main code on the file server.
The solution? Code repositories. Repositories are programs that store and organize source code, executable code, images, attachments, and libraries for client and server-based applications. Many companies also prefer to store project documentation like requirements, specifications, user guides, and project plans in their repositories. With repositories, materials are checked in and out as needed, and older historical versions of the materials are available for rollback (or comparison) in the event that code changes introduce a bug in the program.
Since many company applications are developed and maintained by more than one developer, repositories enable developers to access the entire application while working on their individual coding tasks. Each developer checks out part or all of the code, modifies existing or creates new code for their assigned tasks, tests their code, and then checks the code back into the repository. The changes are tracked, so it is easy to see who made what changes at any point of the project.
This post covers the procedure to setup a remote Git (a Distributed Version Control System) and a remote SVN (a Centralized Version Control System) repository. Please refer to our posts Configure Mac IDEs to Access a Remote Subversion Repository (June 15, 2011) and Configure Mac IDEs to Access a Remote Git Repository (June 24, 2011) for the steps to configure IDEs to access repositories like the two covered in this procedure.
ProjectLocker
I like ProjectLocker because Git is a popular repository in the business world and I’ve seen a number of companies move towards it the past year. ProjectLocker has one free plan where one to three people can share a SVN or Git repository, whereas Freepository also has a free plan but only one person can access the SVN repository – teams are required to pay a monthly fee to share the repository. ProjectLocker also offers five commercial plans where groups of 15 – 250 users can have SVN or Git repositories. I encourage students that want to learn about code repositories to check out this repository hosting site.
To get setup with a repository at ProjectLocker, go to their website (http://www.projectlocker.com), register, setup a project, and then you are ready to configure your IDE so it can access your repository. Its pretty simple and straight-forward, so I won’t go into the setup at this time.
Something nice about ProjectLocker: refer friends and gain extra resources. For each friend that you recommend and they join ProjectLocker, you gain 50 MB of disk storage space. When 5 friends you recommend join ProjectLocker, you gain another user for your account.
Setup a ProjectLocker Account
- Go to the website (http://www.projectLocker.com), select the Account Type (the first one is free).
- Now enter an Account Name and Initial Project Name. Select the Initial Project Type (Git in this case), then enter your email address and a password to access your repository. Press the ‘Continue’ button to continue setup.
- Provide personal information as requested.
- You should receive a Account Created confirmation.
- Log into the ProjectLocker portal.
- The first time you log in, you will be prompted for a security question and a security answer. Enter both, then press the ‘Save Security Information’ button to continue.
- You now see the main portal screen.
- Stepping away from the Portal Page of ProjectLocker, you need a public key to communicate with Git via SSH. Open a Terminal Window and enter ‘ssh-keygen’. You are asked for a file name/location for the file (both a public and private key are generated).
- Back at the Portal Page, Select ‘Manage Public Keys’ underneath ‘User Links’ at the far left side of the page.
- Since no keys have been added, select ‘New Key’.
- Enter the Name, User name, and public key, then press the ‘Save Public Key’ button.
- A ‘Public Key <Name> Saved Successfully’ tells you the process was done correctly. Now select ‘User Home’ under ‘User Links’ at the far left side of the screen to return to your main portal page.
Codesion
Codesion, like ProjectLocker offers SVN and Git repositories for free and for a monthly charge.Check out their website for pricing information.
- To get started, go to the Codesion website and begin the sign up process.
- Enter your information. Your domain, login, and password entered at this time are used to log into your account, so keep track of them. Your email address is where you receive confirmation about the repository setup.
- Enter all the information with an asterisk beside the field label and select the ‘Create My Codesion Account’ button.
- Codesion emails confirmation the account is setup – check the email you specified in step 2 of this procedure.
- Login to your account. Enter your domain, login, and password, and then press the ‘Login’ button.
- Enter your industry information from the three drop down lists on the bottom of this page.
- Now enter a new project name and press the ‘Next’ button.
- Select Git or Subversion as the repository for your new project. For this example, select ‘Subversion’ and press the ‘Next’ button.
- Now select ‘Blank repository’ or ‘Best Practice’. For this example select ‘Best Practice’ and press the ‘Next’ button.
- You project is now setup. The screen now shows the project URL you need to access the repository from your IDE.
- Now that the project is created, you can view the website project tab in your browser.
Pretty simple process to setup a new remote SVN repository.