Getting git working on Linux is really simple: apt-get install git, ssh-keygen –t rsa –C “[email protected]”, cat ~/.ssh/id_rsa.pub, copy to clipboard, paste in your git repo host, ssh [email protected] (accept the new host key), git clone [email protected]:/yourproject.git, bam, done.
Getting it working with Windows can be a right sod. Or it can be equally simple if you’ve not already tried loads of different methods, leaving loads of other conflicting apps installed.
If you follow the github Windows setup tutorial you’ll be pretty much there already.
If you’ve already installed things such as TortoiseGit and PuTTY you may see some confusing errors.
Those along the lines of
FATAL_ERROR Disconnected: No supported authentication methods available
FATAL_ERROR The remote end hung up unexpectedly
are usually related to your public key not being correctly used in the connection.
If you can ssh correctly to the repo I found that this can happen if you have the wonderful PuTTY installed and have pageant (key manager) running somewhere, forcing msysgit to use pageant as the key manager instead of OpenSSH (assuming you selected the OpenSSH option in the msysgit installation).
Some say to update the GIT_SSH environment variable (I didn’t have one to delete, so this didn’t help me much). I ended up deleting PuTTY (overkill) and Pageant and ensuring no related processes were running.
If you get errors along the lines of “access denied” when you try to view or delete a repo:
You’ll most likely find that the process in question is TGitCache – a process related to TortoiseGit. Kill the process and uninstall if you don’t use it.