1. Generate SSH keys via eclipse
The Windows-->preferences-->general-->network connections-->ssh2-->key Management of the menu bar:
Click: Generate RSA key Generate key
Comment: Fill in the IP and username of the GIT server in the format: [email protected]
Passphrase: Password for server
Confirm Passphrase: Password for server
Such as:
Click: Save Private Key Saves the file, then generates two files: Id_rsa (key), id_rsa.pub (public key)
2. Add a public key to Git
Click on "Add SSH key" to fill in the key input box with the contents of the Id_rsa.pub (public key) file (paste all past), then submit.
3. Configure Git in Jenkins
Go to the Job project configuration page
SOURCE management: Choose Git
Repository URL: Fill in the Project code's warehouse address (SSH)
Credentials:
1> Click Add: Configure the key, as
2>credentials drop-down box, select the user name that you just configured
Note: If you have previously configured an error, re-configure after you need to exit Jenkins re-login to enter and then select the new configuration credentials
Jenkins git configuration (ssh key generation via Eclipse)