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

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

    Given that none of the answers here worked for me, I finally tracked down my issue connecting to Bitbucket (or Github, doesn't matter in this case) with ssh -vT git@bitbucket.org.

    In my case, the failure was due to using a DSA key instead of RSA, and apparently my SSH client no longer allows that.

    debug1: Skipping ssh-dss key /c/Users/USER/.ssh/id_dsa for not in PubkeyAcceptedKeyTypes

    The solution was to add this to .ssh/config:

    Host *
        PubkeyAcceptedKeyTypes +ssh-dss
    

    This elegantly appends the ssh-dss key type to all existing accepted public key types and after this was done, git can now ssh into Bitbucket no problem.

提交回复
热议问题