Recently I became part of a team that is beginning to do quite a bit of work in Ruby. As a group committed to open-source, we immediately gave back in the form of a Ruby Gem. Our gem is called Xbee for Ruby and is focused on reading incoming data from the Xbee RF microcontroller. It's very low-level and exciting stuff.
Joining RubyForge is easy. Pushing to your Git repository is not. There is some documentation, but it is sparse and makes things difficult for people that are brand new to ssh public keys. So let's go through the steps from the beginning:
- Head to RubyForge.org and click the New Account link at the top of the page
- Once signed up, log into your email account and confirm
- Now that you're logged in, you can register a project by clicking the Register Project link near the top of the screen
- Fill in the requested details of your project: full name, purpose, pick a license, description, unix name, and choose Git as your SCM
- Once your project is approved, you're ready for your first commit...and this is where it gets tricky for a newcomer. Click the My Account link near the top of the page
- Scroll to the very bottom of the page and in the Shell Account Information section, click the Edit Keys link.
- If you're on Mac or Linux, fire up the Terminal and enter
ssh-keygen -t dsa -C "your_email@email_provider", preferrably using the email address you've configured Git with.
- Terminal will prompt you for a place to save the newly generated keys. It automatically suggests
~/.ssh/id_dsa, and for most uses I'd say this is more than fine.
- So now you've created two files in your
~/.ssh/directory. Open the public key file with your favorite text editor like so:
- Select all of the file, including ssh-dss and the email address you added and copy
- Head back to the RubyForge window you still have open and paste your public key in the box
- Click the update button and be prepared to wait until the top of the hour for your key to be added
- If you haven't done so already, head to the folder where your gem files are stored and initialize your Git repository with
git initand commit everything with
git commit -a -m "initial add"
- Next you'll want to add the remote RubyForge repository with
git remote add origin firstname.lastname@example.org:my_project.git
- Finally the last step! If the top of the hour has passed since you added your public key to RubyForge, you should be ready to push to the remote repository with
git push origin master:refs/heads/master. Done!
A little more difficult than we would have liked, but we did get there eventually and now it's quite easy.