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

前端 未结 23 1711
情深已故
情深已故 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:52

    For me the problem was the execution of clone via sudo.

    If you clone to a directory where you have user permission ( /home/user/git) it will work fine.

    (Explanation: Running a command as superuser will not work with the same public key as running a command as user. Therefore Github refused the connection.)

    This solution requires a SSH key already to be set up: https://help.github.com/articles/generating-ssh-keys

提交回复
热议问题