Possible Duplicate:
github: newbie problems -> Permission denied (publickey). fatal: The remote end hung up unexpectedly
please see the below command ,
$ git clone git://github.com/{user_name}/{project_name}.git Initialized empty Git repository in /home/dengx/rorBlog_demo/rorblog/.git/
Changing the files and committing it, so i need to push back to git repository.
$ git push [email protected]/{user_name}/{project_name}.git master Permission denied (publickey). fatal: The remote end hung up unexpectedly
so, i copy the ssh-key of the repository to my file ~/.ssh/id_rsa.pub, and then push again,
$ git push [email protected]/{user_name}/{project_name}.git master Agent admitted failure to sign using the key. Permission denied (publickey). fatal: The remote end hung up unexpectedly
Now, what should i do , thanks any helps.
The “Permission denied (publickey). fatal: Could not read from remote repository” error is caused by an issue with the way in which you authenticate with a Git repository. To solve this error, make sure your key is being used on your Git account. If it is not, add your key to Git.
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.
Short description. "Permission denied (publickey)" and "Authentication failed, permission denied" errors occur if: You're trying to connect using the wrong user name for your AMI. The file permissions within the operating system are incorrect on the instance.
Googled "Permission denied (publickey). fatal: The remote end hung up unexpectedly", first result an exact SO dupe:
GitHub: Permission denied (publickey). fatal: The remote end hung up unexpectedly which links here in the accepted answer (from the original poster, no less): http://help.github.com/linux-set-up-git/
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