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 [email protected]
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.
In terminal enter this command with your ssh file name pbcopy < ~/. ssh/id_rsa. pub This will copy the file to your clipboard Now open you github account Go to Settings > SSH and GPG keys > New SSH key Enter title and paste the key from clipboard and save it. Voila you're done.
If your attempt to clone a GitHub repository over SSH is foiled by GitHub's Permission denied (publickey) SSH error, there's usually a quick fix. GitHub's Permission denied (publickey) error is usually caused by one of the following three issues: You have used an incorrect email address in the GitHub SSH URL.
Since git just uses ssh to connect, it will use whichever key ssh would use to connect to the remote host. See the ~/. ssh/config file for details; the host block uses the IdentityFile directive to specify the private key to use. The ssh_config(5) manpage contains full details.
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
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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With