Zend Studio and Git(Hub)

I have been using Zend Studio as my IDE for years, and for version control I have always used SVN. Zend Studio Eclipse plays very nicely with SVN out of the box, but lately it seems Git has gained a lot of momentum so I thought I would look into it. It turns out Git is awesome and is much better suited for many of the things I do. (See: Why Git?)

But will Git play nicely with Zend Studio 8?
Thanks to eclipse plugins, you bet it will!

How to set it up

First you will need to install EGit, the Git plugin for eclipse. The easiest way to do this is to add the EGit repository to Zend Studio. Open up Zend Studio and do the following:

  • Navigate to Help -> Install New Software
  • Click the “Add..” button to add the EGit repository (http://download.eclipse.org/egit/updates)Adding the EGit Repository
  • Agree to everything you see (of course read it first)
  • Zend Studio will restart and you will have git support

Adding Keys

To access git hub you need to use public and private SSH keys. If you have never done that before, here is how to create a key using Zend Studio:

  • Open up Zend Studio’s preferences window
  • Navigate to General->Network Connections->SSH2
  • Select the key management tab and click “Generate RSA key”
  • You will see that the text box is now filled with “ssh-rsa” and then a bunch of giberish. That is your new public keyCreating SSH Key
  • Click the “Save Private Key” Function and confirm that you want to save it without a passphrase
  • Login to your GitHub account and go to Account Settings->SSH Public Keys
  • Click add a public key and enter the name (e.g. my laptop) and paste the public key text generated by Zend Studio into the box

Now you will have access to github from Zend Studio

My next post will be on how to clone projects in github and add them as Zend Studio projects.

10 Comments

  1. Dave

    Thanks Clint, worked like a charm.
    Now I’ve only got to figure out how to get GIT working with a Linux server!
    :)

  2. Serban

    Excellent article, was looking for this kind of info for long time. Time to pair Zend Studio with GIT!!! :)

  3. Clint

    Thanks for the positive feedback. I have been meaning to add how to create projects from the Git repos since it isn’t very intuitive. I’ll get some screenshots together and add that soon. In the meantime, don’t hesitate to ask if you have trouble.

  4. Matt

    Just tried to install the EGit plugin. Received the following error:

    An error occurred while collecting items to be installed
    session context was:(profile=studioProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
    No repository found containing: osgi.bundle,org.slf4j.jcl,1.5.10.v20100121-1348

    Has anyone stumbled across this before?

    Thanks in advance!

  5. HenryMalas

    When you continue with the article?

    Hopefully soon ..

  6. Clint

    It has been too long, hasn’t it. I will try and tackle it this weekend.

Leave a Reply