有没有更好的方法断言方法在JUnit 5中抛出异常?
目前,我必须使用@Rule来验证我的测试是否会引发异常,但这对于我希望多个方法在我的测试中抛出异常的情况不起作用.
我有一个git存储库,用SSH密钥对用户进行身份验证,我想将该repo用作GoCD资料.GoCD给了我这个错误:
Error performing command: --- Command ---
git ls-remote ssh://git@server/repo.git refs/heads/master
--- Environment ---
{GIT_ALLOW_PROTOCOL=http:https:ssh:git:file:rsync}
--- INPUT ----
--OUTPUT ---
--- ERROR ---
STDERR: Host key verification failed.
STDERR: fatal: Could not read from remote repository.
STDERR:
STDERR: Please make sure you have the correct access rights
STDERR: and the repository exists.
---
Run Code Online (Sandbox Code Playgroud)
有什么方法可以将SSH密钥添加到GoCD吗?