Question

I am trying to clone a git repo that I forked in my GitHub Repository.It's a rails app. I want to clone it on my local git so that I can push it onto heroku. I generated a set of rsa keys and copied it onto my GitHUb public keys. When I try to git clone "public url" , It says public key denied. I tried an ssh git@github.com to verify my key, it also says public key denied. I've tried several different things to make it work but it still hasn't. I tried to change permissions to 600 and 700 on my .ssh folder. I also tried adding a dsa key because the rsa won't work. please help me. Thanks. :)

I'm on Vista btw.

Was it helpful?

Solution

Answering a very old thread, here, but I'm on Cygwin and just had to do this to start work with my newly created site on phpfog.com

First, I ran this in cygwin:

exec ssh-agent bash
ssh-add ~/.ssh/private-key-name

I then received:

Identity added: /home/scott/.ssh/private-key-name (/home/scott/.ssh/private-key-name)

OTHER TIPS

Copy the public key on your computer i.e., ~/.ssh/id_rsa.pub (open it with notepad)

Paste this key in the "Add SSH key" section in your github account.

Note: to generate a ssh key if doesnt already exist, use ssh-keygen -t rsa

Can you try adding the private key using ssh-add?

After a lot of googling, I found this answer. I had to start the bash engine before i can add the keys. I cloned my app from github to my local server as well.

If you are on Linux, you can try keychain tool to manage SSH agent.

Consider using ForwardAgent option.

Try add:

Host * 
    ForwardAgent yes

to /etc/ssh/ssh_config on local machine.

I had the same problem. Check the contents of your public key file:

  1. it must start with ssh-rsa
  2. it must be ONE line
  3. the format is like this: ssh-rsa manysymbolshere== somekeyname

if you generated the key using puttygen in Windows - DO NOT save public key to a file on disk - it will have comments, which you must delete before copying to a server. Copy the public key to clipboard and then save to a *.pub file using notepad.

SSL certificate rejected trying to access GitHub over HTTPS behind firewall looks to be a very similar question. One solution I took from from those answers to quickly clone a git repository when I don't have the keys set up is to:

export GIT_SSL_NO_VERIFY=true

then clone away.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top