How to prevent that the password to decrypt the private key has to be entered every time when using Git Bash on Windows?

后端 未结 7 2008
南方客
南方客 2020-11-28 17:20

I\'ve an automatic building service which download from a git private repository. The problem is that when it tries to clone repository it need to provide the password, beca

相关标签:
7条回答
  • 2020-11-28 18:26

    You need to create the authorized_keys file under the .ssh folder of the user under which you are going to connect to the repository server. For example, assuming you use username buildservice on repo.server you can run:

    cd ~buidservice
    mkdir ./ssh
    cat id_rsa.pub >> .ssh/authorized_keys
    

    Then you have to check the following things:

    1. That corresponding id_rsa private key is presented in builservice@build.server:~/.shh/id_rsa.

    2. That fingerprint of repo.server is stored in the buildservice@build.server:~/.ssh/known_hosts file. Typically that will be done after the first attempt of ssh to connect to the repo.server.

    0 讨论(0)
提交回复
热议问题