Getting set up with indefero
Introduction
These are notes based on my getting started with an indefero.net account that I purchased in July 2012. Self-hosted accounts may need to take a few extra steps...
The steps here assume you have a locally-hosted got repo that you wish to add as an indefero project. Hope this is useful.
Details
Setting up SSH
Before you can connect to the git repos, you need to set up an SSH key to authenticate your account with.
Generating the Key
Under Linux, you can generate a key pair using open SSH's ssh-keygen program. Run with no arguments to generate a standard RSA key for SSH2, which you'll find in ~/.ssh afterwards. Note that the .ssh folder will be generated with permissions 700,i.e. full access to the user, no access to anybody else. Altering these permissions will stop openssh from working.
Two files will be generatedin the folder: id_rsa, which is private to you, and id_rsa.pub, which you can share.
If you're using Windows, Putty can generate keys for you. Mac users should have access to ssh-keygen (not 100% sure here, I don't use a Mac).
UploadKey to Indefero
Log in to your indefero forge, follow the link from your name at the top "Welcome Dave Crane" or whatever, then the "Update Your Account" link to the left. On the "Your Account" page, paste the contents of id_rsa.pub into the field "add a public key" under "key management" and submit the form.
Now go and do something else for a little while, it can take awhile for the key to be applied...
Testing the Key
Enter the following command into a terminal window:
$ ssh -T git@sunwheel.indefero.net
My forge is sunwheel.indefero.net - substitute the name of your forge. You should get a response back, saying:
"Great, the authentication succeed! You can now push with Git."
You might also see this, which also indicates a successful connection: Need SSH_ORIGINAL_COMMAND in environment.
Push your Code to Git
Now you can push the code in your local repo to Git. First, create a project to house it on your forge. Click "forge management" at the top, then "create a project" on the toolbar beneath. Enter the relevant details, including the project's name. Let's say it's called mycode.git.
Go to your local codebase directory (where the .git file is), and create a remote link to the codebase:
$ git remote add indefero git@myforge.indefero.net:myforge/mycode.git
Substitue myforge for the name of your forge, and mycode for the name of your repo. This creates a remote link called "indefero".
To push your code to indefero, now type: $ git push indefero master
i.e. push your current master branch to the remote indefero repo. This may take a while, to transfer all the stuff.
When it's done, your repo should show the source code. Go from "project list" dropdown at the very top, pick your project, and then select the source tab.
You're in!