I am new to git and when I try to upload my newly created repository to github I get the message:
Permission denied (publickey).开发者_StackOverflow
fatal: The remote end hung up unexpectedly
: Any idea what this means?
Did you forget to add your public key to the github project settings? Also check to make sure your private key is in your .ssh directory.
Goto https://github.com/[username here]/[project name here]/edit and make sure your public key is set.
Read this too: http://help.github.com/mac-key-setup/
I have faced the same problem but i solved using the following steps
First of all i add ssh key to my github account which is not added before. use following command in git bash $ssh-keygen -t rsa -C "your_email@youremail.com"
it generates the new file new_key.pub file whatever you put the file name during the key generation process.
paste your new_key.pub into GitHub. go to GitHub Account -> setting -> ssh key -> add ssh key
now rename the new_key.pub into id_rsa.pub.
and it solved my problem
精彩评论