Posts Tagged ‘configure ProjectLocker for the Mac’

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
  1. Go to the website (http://www.projectLocker.com), select the Account Type (the first one is free).
  2. 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.
  3. Provide personal information as requested.
  4. You should receive a Account Created confirmation.
  5. Log into the ProjectLocker portal.
  6. 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.
  7. You now see the main portal screen.
  8. 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).
  9. Back at the Portal Page, Select ‘Manage Public Keys’ underneath ‘User Links’ at the far left side of the page.
  10. Since no keys have been added, select ‘New Key’.
  11. Enter the Name, User name, and public key, then press the ‘Save Public Key’ button.
  12. 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.

  1. To get started, go to the Codesion website and begin the sign up process.
  2. 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.
  3. Enter all the information with an asterisk beside the field label and select the ‘Create My Codesion Account’ button.
  4. Codesion emails confirmation the account is setup – check the email you specified in step 2 of this procedure.
  5. Login to your account. Enter your domain, login, and password, and then press the ‘Login’ button.
  6. Enter your industry information from the three drop down lists on the bottom of this page.
  7. Now enter a new project name and press the ‘Next’ button.
  8. Select Git or Subversion as the repository for your new project. For this example, select ‘Subversion’ and press the ‘Next’ button.
  9. Now select ‘Blank repository’ or ‘Best Practice’. For this example select ‘Best Practice’ and press the ‘Next’ button.
  10. You project is now setup. The screen now shows the project URL you need to access the repository from your IDE.
  11. 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.

By Mike Hubbartt, © Copyright 2011, All Rights Reserved.

Code repositories are server-based applications to store common code. Our post Configure Mac IDEs to Access a Remote Subversion Repository (June 15, 2011) provides instructions on connecting an IDE to a remote SVN repository (Centralized Version Control System), while our post Configure Mac IDEs to Access a Remote Git Repository (June 24, 2011) provides instructions on connecting an IDE to a remote Git repository (Distributed Version Control System). This procedure covers configuring IDEs for remote repositories once they are setup or they are made available to you.

Configuring Git for Eclipse Galileo

  1. Launch Eclipse.
  2. Select ‘Help/Install New Software’ from the IDE menu.
  3. You are at the Install Screen. Enter (without the surrounding quotes) ‘EGit – http://download.eclipse.org/egit/updates-1.0&#8217; in the field beside ‘Work With:’, then press the ‘Add Site’ button.
  4. Expand the top section (Eclipse Git Team Provider) and select ‘Eclipse EGit’. Press the ‘Next’ button.
  5. Review the items to be installed and then press the ‘Next’ button.
  6. Select ‘I accept the terms of the license agreements’ (if you want to), then press the ‘Finish’ button to install the plug-in.
  7. After the plug-in is installed, restart Eclipse. At the top of the workbench, select the ‘Open Perspective’ button, then select ‘Git Repository Exploring’.
  8. This is the Eclipse Git perspective.

Configuring Git for Xcode 4

Configuring Git for Xcode is a bit more involved than it was to configure this IDE for Subversion. There are two extra processes involved: downloading and installing Git, and creating a symlink to the Git command line tool.

IMPORTANT NOTE. I heard that Git might already be installed as a part of Mac OSX but did not find it on my copy of OSX 10.6.7 (Snow Leopard). If anyone knows that it is pre-installed, please drop me a line to the directory location and I will update this procedure.

Lets get started, assuming we need to download and install Git.

  1. If Git is already installed, skip to step 6, otherwise proceed to step 2.
  2. Download Git. I went to this site and downloaded git-1.7.5.4-i386-leopard.dmg.
  3. Double click on the dmg file to install Git. My copy installed in /usr/local/git/bin.
  4. Open a Terminal, then enter cd .. two times to move to the root (/) directory, then enter cd /usr.
  5. Create the symlink to the Git command line tool: Enter the following command (assuming your copy of Git installs in the same directory as mine – see step 2 of this procedure):
     sudo ln -s /usr/local/git/bin/git /usr/bin/git
  6. Launch Xcode.
  7. Select ‘Window/Organizer’ to bring the Organizer to the screen, then select the Repositories section at the top of this screen.
  8. Select the ‘+’ at the bottom left of the Organizer screen, then select ‘Add New Repository’. At this point, select ‘Type’ and Git is now included in the list (along with Subversion) of supported repositories.  Enter a relevant name and the URL to the hosting site (ProjectLocker in this case, but others can be added for work and school sites as needed).