We use assembla as our git repository. Initially LINUX or MAC machines gave us no trouble syncing with assembla. But when we tried on windows machines, it was not working somehow. Spent many hours “googling” and found everybody have their different ways of doing it using puttygen and many other different tool. None worked for us. Finally realized that I was stupid thinking my machine a Windows machine when I have the beautiful Git bash which allows all the necessary LINUX commands on windows. So here is my way of doing it on Windows:
- Download and install git for windows from http://code.google.com/p/msysgit/downloads/list?can=3
- Open “Git bash” from desktop
- To create public/private keys, run the command
ssh-keygen -b 1024 -t rsa -C YOUR_ASSEMBLA_EMAIL_ADDRESS
- It’ll ask for the path to save the key. Press Enter for default.
- Enter a passphrase to protect your private key. Press enter and re-enter passphrase when asked (Save the passphrase as you’ll need it later)
- Your keys should be created and saved in C:\Users\YOUR_USERNAME\.ssh
- Login to assembla.com, Click “Edit Profile” (below your profile pic)
- Click “Manage your public SSH key” of Manage Git Settings” section at the bottom of the page
- Open your public key C:\Users\YOUR_USERNAME\.ssh\id_rsa.pub in a text editor (for example, Notepad). Copy the key content from editor and paste it in “Add a key, pasting it from clipboard” field in assembla. Make sure there is no newline or space at the beginning or ending. Click “Add Key”. After the key is added check if your assembla email address is displayed under the “comment” column.
- In “Git Bash” type “ssh -v firstname.lastname@example.org”
After some lines of outputs, it will ask you the Passphrase. Enter the passphrase and it should display something like following:
debug1: read PEM private key done: type RSA
debug1: Remote: Forced command: /usr/local/bin/rgitosis 9112c34b6c3b197033c00134
debug1: Remote: Port forwarding disabled.
debug1: Remote: X11 forwarding disabled.
debug1: Remote: Agent forwarding disabled.
debug1: Remote: Pty allocation disabled.
debug1: Authentication succeeded (publickey).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
E, [2011-03-24T05:31:49.022445 #11767] ERROR — : git command not recognized
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
Connection to git.assembla.com closed.
debug1: Transferred: stdin 0, stdout 0, stderr 40 bytes in 1.2 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 32.6
debug1: Exit status 255
If you do not see these lines, and it asks for your passphrase again and again, it means your keys were not generated properly. Delete public/private keys from your machine and assembla profile. Repeat everything from step 2.
If everything goes well, your local repository should be ready to be synced with assemble. Hope this saves your time.