Jenkins Configure source Control git

Source: Internet
Author: User

First, install up Jenkins

Download and install the Jenkins git plugin: git plugin

Create a new Jenkins project and choose to build a free-style software project:

Source management Select Git,repository URL to fill in the Git repository address:

My address is: [Email protected]:/home/repo/test.git format: "username" + "@" + "Git server address" + ":" + "Git repository address"

Credentials there are two ways to configure a git user name and password, and the other is to use a key pair

1, use the user name and password to configure, click Add:

User is a user with Git repository permissions

There is a git user on my git server and ownership of the repository

2, through the SSH key pair way to configure:

The user home directory is first entered on the client

#创建ssh目录 mkdir  . SSH  -t RSA is the type of the specified secret key Ssh-keygen -t RSA

If the key pair created by the difference is key (private key) and key.pub (public key)

The key is the private key that is copied in the key file, and when set, the public key in Key.pub is copied to the./ssh/authorized_keys file in the user's home directory where the server has permissions to the GIT library.

( note [email protected]:/home/repo/test.git, the git user in front of this address is the user who has been added to the Authorized_keys by the above server )

There are two ways to configure Jenkins to support Git.

To access the GIT repository configuration via Authorized_keys see:

http://blog.csdn.net/lyhdream/article/details/49587657

Jenkins Configure source Control git

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.