IntroductionIf you're using git as your SCM, you'll need to install the Jenkins git plugin , potentially configure it, and properly configure your git projects. PrerequisitesI'm assuming you know what git is, and that you have a git environment installed. If you're on Windows, this means either msysgit or cygwin with git installed. Bottom line: from a command line, you should be able to type "git" and get something other than "unrecognized command". If you have git installed, and your cmd doesn't recognize it, it should simply be a matter of adding the path to the "bin" directory to your system's path variable. If you don't have a clue about what I just said, send a note to the mxunit google group and we'll walk you through it. Installing and configuring the git plugin in JenkinsIn the Jenkins plugin section, find the "git plugin" and install it. This is NOT the github plugin, which is merely a decorator. You need the git plugin to communicate with your git projects regardless of where you host them. Git pathOnce installed, and you've restarted Jenkins, head to "Manage Jenkins" and find the config section for git. By default it'll show something like "git.exe" in the git path. This may or may not work for you. In addition, if you don't have git installed, it'll give you an option to download it. In that field, I entered the full path to my git.exe, which on windows was "C:\cygwin\bin\git.exe" Git user valuesA few sections down, you'll see additional config options for Git. This is where you'll enter the default user.name and user.email config options. Go ahead and add the user.name and user.email values that you most frequently use... you can override them at the project level if necessary SSH KeysOn Windows, SSH Key management is apparently more complicated than other OSs. When I used ssh-keygen to create keys, I specified a password for the keys and consequently had to type that password whenever I used the key. This caused problems with Jenkins because there was no place to specify the key passphrase. To solve, I created new keys, with no passphrase, and registered that new key with github. Configuring your Jenkins jobIn the git section of your job configuration, you'll simply add one or more git repositories. I used the SSH URL for mine (for example, [email protected]:marcesher/mxunit.git). Jenkins will attempt to clone that repo, using your public key for authentication. Ensure 2 things:
|
Navigate space |