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

前端 未结 19 1306
迷失自我
迷失自我 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:19

    When the remote server wants to connect to the private repo, it would authenticate via ssh. Create the private-public key pair with ssh-keygen or if you already have the public-private key. copy&paste the public key in the Settings of the private repo.

    YourPrivateRepo -> Settings -> Deploy Keys -> Add deploy key -> Paste the public key.

    Now the remote server would be able to connect to the private repo.

    NOTE: The deploy keys has access only for reading the repo. Need to explicitly allow write access.

提交回复
热议问题