I can’t say enough about ProjectLocker, they offer a great service with support for SVN and Git. As a newbie to Git I thought it might be worthwhile to share my installation and setup steps.
Please note the below steps assume you are running Snow Leopard and have already have a ProjectLocker Account.
- Generate a public key by typing the following in the terminal window ssh-keygen –t dsa
- This will create a new hidden directory called .ssh
|1) Install Git using the Git for OS X installer|
|2) I also recommend installing Open Terminal Here which allows you to open a terminal window directly from the current Finder directory.|
|3) Either using Open Terminal Here or a standard terminal window navigate to your project directory.|
|4) In the terminal window type git init this will create the subdirectory .git|
5) If you do not have a public key you will to create one as outlined below:
Navigate back to your home (User) directory ( if you get lost close and re-open terminal)
|6) Navigate to this directory by typing the following in the terminal window cd .ssh|
|7 ) Open your key using TextEdit by typing the following in the terminal window open –a textedit id_dsa.pub This will open your public key in TextEdit. This key is needed in your ProjectLocker setup.|
|8) Login to your ProjectLocker account|
|9) Select the Manage Public Keys link on the left hand side of the screen under User Links|
|10) On the Manage Public Keys screen press the New Key option at the bottom of the screen.|
|11) Paste the entire contents of your public key now open in TextEdit into the Key field in your ProjectLocker Screen, Fill in the name on the Manage Public Keys screen to anything. This is just a label to help you organize your keys. Generally I think it is best to make this your computer name. The User Name field is alittle tricky. This is generally your login username on your machine. The easiest way to confirm what username to enter is to look at the last part of your key. This should have your username. See the below example:|
|12) Press Save Public Key and you are ready to start setting up your ProjectLocker Git project|
|13) Press the Add Project link located on the left of your screen under Account Links.|
|14) Enter your project name and description, then select a Repository Type of Git see below example:|
|15) Now press the List Projects on the left of your screen under Account Links.|
|16) Press the Edit option for your project and enable HTTP Access as shown below:|
|17) After you press Save Changes you will be taken to a screen showing your project details. You want to verify that your username is listed in the Users In Project section. If it is not press the Add option next to your name under the Account Users not Assigned to this project section.|
18) Now press the User Home link on the left of your screen under User Links. This lists all projects you have access to. Scroll to see your new Git project. Which should look something like the below:
|19) The Git Location information is needed when you are setting up your remote repository. Copy this string to your clipboard, you’ll need this in a minute.|
20) Go back to your terminal window and navigate back to your project directory setup in step #3.
In your terminal window type git remote add origin git-ConceptGeek@free1.projectlocker.com:MyTest.git (Substitute the Git Location information git-ConceptGeek@free1.projectlocker.com:MyTest.git with what you have copied to your clipboard as part of step #19)
|21) Then in your terminal window type git add * this will add files in your project directory into your local git repository.|
|22) Now that you’ve added files to your repository you need to do an initial commit. In your terminal window type git commit –am “Initial commit” and press enter.|
Finally you will need to push your local copy to ProjectLocker. You can do this by typing git push origin master in your terminal window or using a GUI client as one of those detailed in this post.
I’m sure there is a more efficient why to configure Git to speak with ProjectLocker, but as a Git and Mac newbie the above seemed to work best for me. I haven’t been able to find thorough documentation on this subject so hopefully it helps someone out along the way.