Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Permission denied (publickey). fatal: The remote end hung up unexpectedly while pushing back to git repository [duplicate]

Tags:

github

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.

like image 603
coolesting Avatar asked Aug 15 '11 13:08

coolesting


People also ask

How do I fix error permission denied publickey fatal could not read from remote repository GitHub?

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.

How do I fix Permission denied in 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.

Why do I get permission denied publickey?

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.


1 Answers

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/

like image 70
johnny Avatar answered Sep 21 '22 06:09

johnny