GitHub: Permission denied (publickey). fatal: The remote end hung up unexpectedly

前端 未结 23 1803
情深已故
情深已故 2020-11-28 01:09

I have followed these instructions below to upload a project.

Global setup:

 Download and install Git
  git config --global user.name \"Your Name\"
         


        
23条回答
  •  不知归路
    2020-11-28 01:39

    I faced a similar issue when running SSH or Git Clone in Windows. Following findings helps to solve my problem:

    • When you run “rhc setup” or other ssh methods to generate ssh key, it will create the private key file id_rsa in .ssh folder in your home folder, default is C:\User\UserID
    • Git for windows has its own .ssh folder in its installation directory. When you run git/ssh, it will look for private key file id_rsa in this folder
    • Solved the problem by copying id_rsa from the home folder .ssh folder to the .ssh folder in the git installation directory

    Also, I think there a way to “tell” git to use the default .ssh folder in home folder but still need to figure out how.

提交回复
热议问题