How to use Git & Github on Windows
This is an open discussion with 12 replies, filed under General.
Search
Phoque, why should someone need Putty again? I didn’t get it from your comment. I’m using GIT on WinXP without Putty and still no problems.
I believe you need to connect to githup at least once to fetch their public key. After that you don’t actually need it anymore.
Phoque, why should someone need Putty again?
I didn’t need to install Putty with Windows 7 Pro… just msysgit.
They use different line endings and cause headache for everybody.
Hey, it’s not non-Windows users who cause headaches with their line endings, it’s Windows users causing trouble for the rest of us ;) But thanks for the heads up on the git setting!
I didn’t need to install Putty with Windows 7 Pro… just msysgit.
MsysGit and nothing else and you’re able to connect to Github?
@phoque
MsysGit and nothing else and you’re able to connect to Github?
Yes. Followed the tutorial on Github to create personal key/pass, added it to Github account and started playing.
I didn’t need Putty or other tools. Just Git bash and followed the ssh key tutorial.
I also installed TortoiseGit and it really is Tortoise :) I mean it’s not very fast. I’d rather use Mercurial, but Symphony is using Git :)
Hmm… okay then. My information seems to be seriously outdated. Do not read any of that stuff in my post above! ;-)
Miika: I’ve been using GitExtensions and SmartGit before I switched to Linux. GitExtensions might look nice but was very unstable at that time. SmartGit on the other hand is really really good.
I’d rather use Mercurial, but Symphony is using Git :)
I thought so too. But GitHub simply beats anything that’s out there. Now I’m used to Git and don’t want to go back to Mercurial.
phoque: I saw SmartGit when searching Git GUI.
I thought so too. But GitHub simply beats anything that’s out there. Now I’m used to Git and don’t want to go back to Mercurial.
Can you explain that a little?
Git does not equal Github
Git is the program on your computer. Git and Mercurial are very similar except Mercurial’s commands feel to be a more userfriendly.
In my opinion the biggest difference are hosting services like Github. I’ve never seen anything like it. The ability to contribute code so easily via one-click-forks and pullrequests just shows how stupid and bureaucratic open source software development has been for so long.
So, with regard to Github, I see the advantage clearly on Git’s side. Plus, you only need to learn it once. We’re doing all our proprietary code in Git too now. Heck, I’m even using it for my Diploma-thesis now! :-)
Yea I actually just installed Git on my windows pc (vista 64) without the need for any of the putty stuff. Just installed and followed some instructions on generating a sshkey. Piece of piss so to speak!
Create an account or sign in to comment.
I just noticed that other people have the same issues I had when installing Git on Windows. I think I followed an instruction I found online but it was a bit confusing so here it goes:
The binary distribution for Windows is called MsysGit. Install it (and don’t let the ‘preview’ part in the filename distract you, they’re stable).
Git itself doesn’t provide a SSH agent. Other OSes like MacOSX or Linux have their own but Windows doesn’t. This is where the team that made PuTTY jump in.
Besides PuTTY, the ssh client, they also made Pageant, an SSH agent, PuttyGen, a SSH-key generator, and Plink, the interface for other programs to PuTTY. You need to install all four of them.
What you now need to do is
The first step is the hardest (heh): You need to set an environmental variable that tells Git where to find the SSH client. For this you need to open the System settings, search for “environmental variables” and open the appropriate dialog. Then go ahead and create a variable called
GIT_SSH
. Its value is the path to the Plink executable.But: The value may not contain any whitespace!
Unfortunately, to follow Windows’ installation scheme you’d install PuTTY, Pageant, Plink and PuttyGen in
C:\Program Files\PuTTY\
. This will not work.You either need to install it in
C:\PuTTY
or addC:\Program Files\PuTTY\
to thePATH
variable (enabling you to execute the progam without prefixing it with it’s full path).If you do the first, you need to set
GIT_SSH
toC:\PuTTY\Plink.exe
, if you chose the latter, simply set it toPlink.exe
.Next, create your Keypair. Open PuttyGen, select RSA, set the keylength to 1024 or 2048 and follow its instructions (move around the mouse, enter an optional passphrase etc.). Save both public and private key.
Load the private key in Pageant and paste the public key in your Github Account settings (the key needs to start with
ssh-rsa
, it’s best you copy the text directly from PuttyGen).After that, try to connect to
github.com
using PuTTY. This will load their public key in your authorized keys file (they encrypt their stuff using the public key you sent them while your system encrypts stuff you send them using the public key you just recieved).