我们在Jenkins服务器上有一个作业(java),该作业由来自Gitlab服务器的Webhook触发,但是在构建过程中gitflow maven插件会抱怨权限被拒绝?这通常意味着ssh键有问题...
我检查了以下内容:
1.) jenkins can communicate with gitlab (the repo does get cloned)
2.) there is a user in gitlab that has developer rights and the project in question has a deploy key enabled (with write permissions)??
3.) The pom.xml file has the right scm connection.
问题是它应该可以工作:),我认为问题出在gitflow-maven-plugin上:
Stacktrace:
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 39.587 s
[INFO] Finished at: 2018-11-30T13:06:17+00:00
[INFO] Final Memory: 29M/197M
[INFO] ------------------------------------------------------------------------
Waiting for Jenkins to finish collecting data[ERROR] Failed to execute goal com.amashchenko.maven.plugin:gitflow-maven-plugin:1.10.0:release-finish (default-cli) on project template: release-finish: Permission denied (publickey).
[ERROR] fatal: Could not read from remote repository.
[ERROR]
[ERROR] Please make sure you have the correct access rights
[ERROR] and the repository exists.
[ERROR] -> [Help 1]
任何建议都会有所帮助。
更新:
我找到了答案,如果其他人也有类似的问题,快速的解决方案是使用“ ssh代理” jenkins插件,该插件将在构建过程中保留ssh密钥。
答案 0 :(得分:0)
此刻我正在学习,我认为这是因为您没有访问此git存储库的有效特权,您可能想问一个可以给您访问权限的人,但我不是100%确定是否是这种情况。