How to debug Jenkins error message “could not find

2019-05-06 18:07发布

I'm using Jenkins on Win7 and i've installed tomcat for ssh-agent plugin. And I could clone my GitLab project via git bash via ssh.
But if I build the project by Jenkins, it always says :

[ssh-agent] Using credentials IliptonChen(APRTest)
[ssh-agent] Looking for ssh-agent implementation...
[ssh-agent] FATAL: Could not find a suitable ssh-agent provider
FATAL:[ssh-agent] Unable to start agent

The full output text is here

Did I do anything wrong?

3条回答
家丑人穷心不美
2楼-- · 2019-05-06 18:38

For windows, the plugin still requires Tomcat to be installed in both master and slave.

查看更多
来,给爷笑一个
3楼-- · 2019-05-06 18:48

Check the version of your ssh-agent used by Jenkins.
This bug (for linux, but could apply to Windows too) reports (10 days ago, January 2014) this very same error message:
"JENKINS-20276: Native Library Error after upgrading ssh-agent from 1.3 to 1.4".

Downgrading to 1.3 resolves the issue.

查看更多
你好瞎i
4楼-- · 2019-05-06 18:50

Assuming you've installed Windows Git on Windows slave, it comes with ssh-agent binary (e.g. C:\Program Files\Git\usr\bin). Try adding its path to system variable PATH.


Otherwise untick SSH Agent and choose the credentials by selecting Credentials from dropdown in Source Code Management section.


Another way is to generate personal API token (OAuth) for that GitHub user and include that along with your repository address, e.g.

git clone https://4UTHT0KEN@github.com/foo/bar
查看更多
登录 后发表回答