在linux上生成秘钥
在Linux中生成秘钥:
root@xx:~$ ssh-keygen
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Created directory '/root/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx root@xx
The key's randomart image is:
+--[ RSA 2048]----+
| |
| |
| |
| . |
| x x. x S |
|. o. O o . |
| x ox.* x . |
| ooxo o.x |
| xo .x.xo. |
+-----------------+
$cd ~
$cd .ssh
$cat id_rsa.pub
root@xx:~/.ssh$ cat id_***.pub >> authorized_keys 把秘钥粘贴到自己的github上,github上有个add
jenkins上配置git的路径要设置成这样

配置工程的时候用git路径

|