当前位置:网站首页>Jenkins voucher management

Jenkins voucher management

2022-06-11 06:13:00 Jingming scaler

Catalog

1、 install Credentials Binding plug-in unit .

2、 combination git Pull up the code , Presentation voucher management .

 2.1、jenkins Installation on git plug-in unit

 2.2、CentOS7 Installation on Git Tools

3、 The user password type creates a voucher

 3.1、 add to http The credentials

3.1.1、 Using credentials

 3.1.2、 Use Jenkins structure , Pull the code

  3.2、 add to ssh The credentials

 3.2.1、 Use root Users generate public and private keys

3.2.2、 Put the generated public key in gitlab On


Credentials can be used to store database passwords that require ciphertext protection 、Gitlab Password information 、Docker Private warehouse password, etc , In order to Jenkins It can interact with these third-party applications .

1、 install Credentials Binding plug-in unit .

To be in Jenkins Use the voucher management function , Need to install Credentials Binding plug-in unit .

 

 

After the installation , stay Manage Jenkins Can be found in : Different versions have different locations , Some versions are listed in the left-hand menu .

 

2、 combination git Pull up the code , Presentation voucher management .

In order to make Jenkins from git Can pull code on , Need to be in jenkins Installation on git plug-in unit 、linux Installation on server git .

 2.1、jenkins Installation on git plug-in unit

 2.2、CentOS7 Installation on Git Tools

yum install git -y  install

git --version    Check the version after installation

3、 The user password type creates a voucher

 

 

 

 3.1、 add to http The credentials

Account No gitlab Account number registered on

 

3.1.1、 Using credentials

 

 

visit gitlab, Copy project address :

  visit Jenkins, Enter the gitlab Address , Select add a good voucher , preservation :

 3.1.2、 Use Jenkins structure , Pull the code

  Pull complete :

  3.2、 add to ssh The credentials

ssh Secret free login diagram :

 3.2.1、 Use root Users generate public and private keys

ssh-keygen -t rsa

stay /root/.ssh/ The directory holds the public and private keys .

id_rsa: Private key file

id_rsa.pub: A public key file

 

3.2.2、 Put the generated public key in gitlab On

With root The account login -》 Click on the picture -》Settings-》SSH Keys

gitlab Must log in root account number , Other accounts cannot be set , The password you set is root123456 .

gitlab Add public key on :

 

Jenkins Add a private key to the :

 

 

         

 

 

Jenkins Upper item settings git Last project ssh Address :

 

  Delete the original item , again build:

 

 

原网站

版权声明
本文为[Jingming scaler]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/162/202206110604091816.html