0

I have Jenkins build server running on Ubuntu and configured a windows machine as slave. To compile .net code, I have created jenkins jobs to run specifically on this windows slave. On the windows machine (jenkins slave), I have installed GIT. Upon successfully creation of SSH public key and uploaded in AWS, I am able to clone the repository from the command line. But if I clone the same repo from the Jenkins job, I get the following error.

stderr: fatal: protocol error: bad line length character: logi

Here are my questions:

  1. Can Windows Server 2012 R2 be used as a Jenkins Slave?
  2. I logged in as 'jenkins' user however, I want to find out if I access the GIT (codecommit) as a Jenkins user?

I tried to find answers from various sources but could not find any lead. Any thoughts on this?

doubledecker
  • 357
  • 1
  • 5
  • 13
  • Possible duplicate of [Git error: "Host Key Verification Failed" when connecting to remote repository](http://stackoverflow.com/questions/13363553/git-error-host-key-verification-failed-when-connecting-to-remote-repository) – Jakuje Sep 17 '16 at 08:15
  • @Jakuje - my problem is on windows. – doubledecker Sep 17 '16 at 15:01

2 Answers2

0

The jenkins job might be running as a different user to that which you were logged in as. Make sure you have the appropriate keys in the SSH config of that user.

I haven't used Jenkins myself, but I've used Go CD (https://www.go.cd/) and have run into this before, creating the key as the root user, but pipelines/jobs actually run as the go user.

raids
  • 1
0

On the EC2 instance, I have created a 'jenkins' user and ran the JNLP agent. Jenkins says as connected. I have executed a windows command successfully. But when I use try to use 'GIT' plugin to pull the code from repository, I get the error mentioned in my original post.

I have the same setup in my other laptop setup in office and I am able to pull code from 'GIT' without any problems. The main problem with this is that I cannot work from home as the laptop goes to sleep/shutdown by itself. This setup is not ideal in most of the situations.

doubledecker
  • 357
  • 1
  • 5
  • 13