解决linux系统上部署jenkins 配置git的方法

论坛 期权论坛 编程之家     
选择匿名的用户   2021-6-2 20:37   1002   0

在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路径



分享到 :
0 人收藏
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

积分:3875789
帖子:775174
精华:0
期权论坛 期权论坛
发布
内容

下载期权论坛手机APP