开发者

uploading a repository to github fails says "permission denied"

开发者 https://www.devze.com 2022-12-24 22:35 出处:网络
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

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

  1. 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.

  2. paste your new_key.pub into GitHub. go to GitHub Account -> setting -> ssh key -> add ssh key

  3. now rename the new_key.pub into id_rsa.pub.

and it solved my problem

0

精彩评论

暂无评论...
验证码 换一张
取 消