Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem connecting to GitHub on Windows, even via PuTTY

I know there's already discussion of this problem in various places (in and out of Stack Overflow), but I haven't found a solution that works consistently. Right now, I'm trying to connect to github via putty.

I'm connecting to github.com, loading my private key, and getting a

login as:

prompt. When I hit enter, I get the usual "Disconnected: No supported authentication methods available" error message. I am passing along the correct private key! (I've tested this key from another computer and it works). I've tried with and without pageant (and made sure the key is loaded there). How do you recommend I proceed?

Edit - The problems I'm experiencing pushing to github seem to manifest themselves in one of my repositories, but not the other. How can I check or fix the damaged repository? (It doesn't appear damaged in any other way, I just can't push anything from it). Both use the same key.

like image 819
ripper234 Avatar asked Jan 05 '11 07:01

ripper234


2 Answers

This was the answer for me:

http://false.ekta.is/2010/05/putty-pageant-git-and-github-key-problems/

  1. You DO want to use plink for ssh when you’re installing msysgit.
  2. Putty’s public key that you have saved isn’t in the right format for pasting into github.
  3. fire up puttygen again, but choose to LOAD AN EXISTING KEY
  4. copy and paste from there into github.

Do not try things like opening up your saved public key, removing the comment lines, and adding ssh-rsa to the front or things like that. It won’t work.

like image 93
Wayne Bloss Avatar answered Nov 03 '22 05:11

Wayne Bloss


Well, this doesn't really answer my original question (Connecting with PuTTY), but I did find out what the problem with the repository was.

I was using an HTTPS URL for the repo. When I switched to URLs like "[email protected]:ripper234/Basic.git", it worked flawlessly.

like image 41
ripper234 Avatar answered Nov 03 '22 05:11

ripper234