gitflow-maven-plugin权限被拒绝错误(jenkins-gitlab)

问题描述 投票:1回答:1

我们在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密钥。

maven jenkins git-flow
1个回答
0
投票

我正在他们那里学习,我想这是因为您没有访问此git存储库的有效特权,您可能想问一个可以给您访问权限的人,但是我不确定100%如果是这种情况。

© www.soinside.com 2019 - 2024. All rights reserved.