5

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.

ripper234
  • 222,824
  • 274
  • 634
  • 905
  • This is not the first time I've had this hassle. I'm _almost_ tempted to think I should forgo github altogether for personal projects, and store my local repository on dropbox, saving me the need to push altogether. Almost. – ripper234 Jan 05 '11 at 07:06
  • Behind a proxy? That has been a problem for me. Also double check that key - I spent ages looking for problems before realising I'd got the wrong key. – Benjol Jan 05 '11 at 08:53
  • @Benjol - Not behind a proxy, key is good. Check out my edited question. – ripper234 Jan 05 '11 at 19:53
  • 1
    For those stumbling across this and are as tired as me - don't forget the "git@" prefix to the URL like I did for a couple of days - it has the same symptoms. Take a break folks. – CAD bloke Dec 05 '12 at 10:55
  • And don't do what I did and use "username@"... that's how I ended up here despite having everything set up correctly. Once I corrected that it all worked... – MartyMacGyver Jan 20 '13 at 13:35

3 Answers3

11

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.

Thiem Nguyen
  • 6,345
  • 7
  • 30
  • 50
Wayne Bloss
  • 5,370
  • 7
  • 50
  • 81
  • This actually works! Glad to have found this answer after stumbling into this problem multiple times (previously resolved by accident) – prusswan Jan 13 '12 at 06:24
  • Thank you! IMHO the very first thing one should try before doing anything else is "plink -v -agent git@github.com" (which was on that page as well). – MartyMacGyver Jan 20 '13 at 13:38
1

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 "git@github.com:ripper234/Basic.git", it worked flawlessly.

ripper234
  • 222,824
  • 274
  • 634
  • 905
-1

If you are running on windows then skip the keys ssh keys altogether.

Use the github plugin found at: windows.github.com

Install the plugin (top right "download") When it's installed you just need to login. Then when ever you need to clone simply click on the "clone to windows" button found in the github webpages.

Choco Smith
  • 1,658
  • 18
  • 24