To access a git repository from Jenkins, I need to login as this user and execute some commands (according to e.g. http://www.uvd.co.uk/blog/labs/configuring-jenkins-continuous-integration-server-to-work-with-git/, Jenkins Host key verification failed or Managing SSH keys within Jenkins for Git, I need to accept the host to known hosts and generate an ssh-key. I created the key with the root user, and added credentials to jenkins - it does not work, and therefore I assume it is still the wrong known hosts). But everytime I do su jenkins
, the following appears:
reichelt@aspra4:~$ su jenkins
No passwd entry for user 'jenkins'
Even the solution recommended here: how to run script as another user without password does respond the same thing:
reichelt@aspra4:~$ su -c "git ls-remote -h ... HEAD" -s /bin/sh jenkins
No passwd entry for user 'jenkins'
But nevertheless, I need to connect somehow to the server. Does anybody has an hint how to get this working?