Sunday, June 9, 2013

Distributed your Git repository to RubyForge (Linux)


There are some notes on the RubyForge site but it wasn't obvious to someone has doesn't live and breath SCM.  I found the following useful:
NOTE:  If you are already using GitHub, you probably already have a ~/.ssh/id_rsa.pub key.  That didn't work.  My suspicion is that RubyForge wants your account name in the key, not your e-mail address.

Part 1: Make a RubyForge key
ssh-keygen -t rsa -C your-account-name -f id_rubyforge
Part 2: Add the key to your account
  • You add the key to your account using the high level "My Account"
    • edit keys is at the bottom of the screen
  • I use xclip to copy the contents of a file to the clipboard:
xclip ~/.ssh/id_rubyforge.pub
Part 3:  Add a rubyforge.org section to your ~/.ssh/config file

Host rubyforge.org
     user your-account-name
     IdentityFile ~/.ssh/id_rubyforge.pub
Part 4: Verify that sftp works
sftp -v rubyforge.org
The -v option produces useful trace information about the connection process.  An ssh guru/wizard may be able to help you if they have that output.

Once that is done, you can add RubyForge as a remote repository:

git remote add rubyforge gitosis@rubyforge.org:YOURPROJECT.git

and then:
git push rubyforge master

No comments:

Post a Comment