简体   繁体   中英

Enable ssh-agent as a service for Jenkins on Windows 8

I'm trying to get Jenkins to connect to a git repo on the same machine. I installed the SSH Agent plugin but I don't believe the ssh-agent process is being started as I don't see it in the Task Manager. I can confirm this when I have the machine try and login itself with the same credentials. It both say "Please make sure you have the correct access rights and the repository exists."

The SSH server is operated using Bitvise SSH server, and I can get other machines to access the git repos on it with no problem. I have a copy of OpenSSH installed and I tried to create a process based on that (for ssh-agent) but I'm pretty sure I didn't do it right since it returned "Access Denied" using the sc.exe create command.

What I would like to know is if there is an easier way of having Jenkins check if ssh-agent is running and if not, start it. Otherwise Windows will have to handle it instead.

First, if the repository is on the same machine as Jenkins itself, a Jenkins job could reference it through its path instead of SSH or HTTPS.

Second, Jenkins generally does not have to control if a listener (like an SSH daemon service) is up or not when it tries to access a repository.
That means the SSH daemon should be managed as a Windows service, with an Automatic start policy.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM