Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Getting Continua to work with a git a Git repository over SSH takes a couple of additional steps. 

Step 1.

...

Ensure git is installed and setup

I've chosen to use the offical git official Git for Windows package found at http://git-scm.com/download/win

...

Code Block
git config --global user.name "Your Name"

git config --global user.email you@email.com

...

Step 2.

...

Set environment variable

When the SSH tools are used by git executableGit executable, it will use the value in the HOME environment variable which contains the path to the SSH settings to be used by gitGit. You can set an environment variable by right-clicking My Computer/Computer in your start-menu then selecting Properties. Click the Advanced system settings heading and you should see this dialog.:

Image Modified

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Click Environment Variables.

Image Modified

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Make sure you are logged in as the same user the Continua server is run under. Click the New button in the section for User variables

Image Modified

 

 

 

 

 

 

Enter HOME for the Variable name and %USERPROFILE% for the Variable value.

Once the variable is created, you MUST restart the Continua server CI Server service otherwise it won't detect the new environment variable you just created. If this happens, Continua CI will hang waiting on input from the user. You need to kill the processes plink.exe and ssh.exe then stop the Continua server CI Server service. 

Step 3.

...

Generate SSH Keys

Navigate to the directory git Git was installed to, by default it's C:\Program Files (x86)\Git, go into the \bin directory and look for the executable ssh-keygen.exe.

...

This command generates a private key file id_rsa and a public key file id_rsa.pub in the %USERPROFILE%/.ssh directory. In order to get a passwordless password-less SSH session happening between the Continua CI server and the SSH server, we need to make sure the SSH server has the Continua CI server's public key in its authorized_keys file. You only want to add the public key to the authorized_key file that belongs to the user the Continua CI server will be logging in as. Log into the SSH server and add the contents of id_rsa.pub to the authorized_keys file. You can find it in /home/name_of_user_continua_will_login_as/.ssh/. If the file doesn't exist, create it. 

 

Step 4.

...

Cache key and validate settings

The final step is to cache the key in the registry. To do this, run the git Git command:

Code Block
git ls-remote user@ssh_host:/path/to/git/repo

...

If you're prompted for a password, then something went wrong with the private/public key setup.

...