Git error: “Host Key Verification Failed” when connecting to remote repository

前端 未结 19 1286
迷失自我
迷失自我 2020-11-22 11:40

I am trying to connect to a remote Git repository that resides on my web server and clone it to my machine.

I am using the following format for my command:



        
19条回答
  •  醉话见心
    2020-11-22 12:17

    Its means your remote host key was changed (May be host password change),

    Your terminal suggested to execute this command as root user

    $ ssh-keygen -f "/root/.ssh/known_hosts" -R [www.website.net]
    

    You have to remove that host name from hosts list on your pc/server. Copy that suggested command and execute as a root user.

    $ sudo su                                                        // Login as a root user
    
    $ ssh-keygen -f "/root/.ssh/known_hosts" -R [www.website.net]    // Terminal suggested command execute here
    Host [www.website.net]:4231 found: line 16 type ECDSA
    /root/.ssh/known_hosts updated.
    Original contents retained as /root/.ssh/known_hosts.old
    
    $ exit                                                           // Exist from root user
    

    Try Again, Hope this works.

提交回复
热议问题