Oct 28

I’m on OS X — Windows users may be able to use this as a general guide only. The command lines will not work for you.

1.Install Git for Mac OS X

2. Open up Terminal and type:

  • $ cd ~/.ssh
  • $ ssh-keygen
  • <enter> // defaults to id_rsa
  • <passphrase>
  • <passphrase again>

3. Type ls -l

  • You should see two new files, id_rsa and id_rsa.pub

4. This generated a public key (in id_rsa.pub) that you need to enter into ProjectLocker so it can authenticate your machine. You can copy it’s contents to the clipboard with the following command:

  • $ cat id_rsa.pub | pbcopy

5. Go to ProjectLocker and create a free account (you can always upgrade later)

6. Add a project, and choose ‘Git’ as the type

7. Click ‘Manage Public Keys’ on the left and add a new one:

  • Name: <name_your_machine> NOTE: This can be anything — a machine identifier of your choice
  • User Name: <user name> NOTE: You MUST use the username you used to create the identifier on your machine. It should be listed at the end of the public key, like alias@machinename.local
  • Key: Paste (You should have the key on your clipboard already from step 4) NOTE: verify that the username at the end of this key matches what you put in the ‘user name’ field

8.Let’s test it! At Terminal, type:

  • ssh git-@free1.projectlocker.com

You should get something like this in response:

PTY allocation request failed on channel 0
ERROR:gitosis.serve.main:Need SSH_ORIGINAL_COMMAND in environment.
Connection to free1.projectlocker.com closed.

That’s OK! That’s what we wanted!

9. In ProjectLocker, click, ‘User Home’ on the left, and copy the git location key that should look like this:

Your Git Location: git-username@free1.projectlocker.com:InitialprojectName.git

10. In Terminal, nagivate to the directory where your project is you want to commit. Then type the following commands:

NOTE: That before you do your ‘git add *’ coming up, you can create a file in the repo root called .gitignore and add any files/folders to it that you want to ignore. For example, mine looks like:

.DS_Store
build

Now on to the commands:

  • git init
  • git remote add origin git-username@free1.projectlocker.com:InitialprojectName.git (Substitute <ProjectName> with your project name, and the Git Location key with the one you found in Step 9 above)
  • git add *
  • git commit -am “initial commit”
  • git push origin master

Now you should see it uploading! mine looked like this:

Counting objects: 199, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (171/171), done.
Writing objects: 100% (199/199), 3.66 MiB | 857 KiB/s, done.
Total 199 (delta 39), reused 0 (delta 0)
To git-username@free1.projectlocker.com:ProjectName.git
* [new branch]      master -> master

11. Now back in ProjectLocker when I navigate to my project I created I see all my files checked in there!

Post to Twitter

Oct 27

I’ve been going through a Fall cleaning of sorts in my house, my office, and now my computer. I feel like I’ve gotten a little too lax with my files and code security so it’s time to try a new system and see if I can keep up with it and lessen the risk of losing all my bits of projects scattered all over the place.

With all this Git hype, I’m going to give it a try.

When it comes to all these projects I have everywhere, I’m just a one man team — I don’t need to share the code base with anyone. Also, I need a lot of repositories — I’m not like a team focusing on one project. I skip around, and I’m great at not finishing some of them but I want to keep them around of course. So I started looking around for reasonable Git hosts. I hear a lot of good things about GitHub, but with the number of repositories I’ll use, I’ll quickly be paying more than I’m willing too at this time. Similar problem with Unfuddle. Now, I have to say, I may very well go with GitHub due to it’s reputation if I only needed one (or a couple) repos. But for my case ProjectLocker really seems to fit the bill because with the free account I’m limited by space, not project number, repository count, or having to have the projects public (I want them private!).

Post to Twitter

 
preload preload preload