how to setup ssh keys for jenkins to publish via ssh

前端 未结 3 779
我寻月下人不归
我寻月下人不归 2020-12-13 00:26

Jenkins requires a certificate to use the ssh publication and ssh commands. It can be configured under \"manage jenkins\" -> \"Configure System\"-

3条回答
  •  无人及你
    2020-12-13 01:11

    For Windows:

    1. Install the necessary plugins for the repository (ex: GitHub install GitHub and GitHub Authentication plugins) in Jenkins.
    2. You can generate a key with Putty key generator, or by running the following command in git bash: $ ssh-keygen -t rsa -b 4096 -C your_email@example.com
    3. Private key must be OpenSSH. You can convert your private key to OpenSSH in putty key generator
    4. SSH keys come in pairs, public and private. Public keys are inserted in the repository to be cloned. Private keys are saved as credentials in Jenkins
    5. You need to copy the SSH URL not the HTTPS to work with ssh keys.

提交回复
热议问题