allegro / allegro/axion-release-plugin

how to force to use a specific identity from ssh agent?

未關閉
#912 0 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Groovy
星號
641
分支
165
平均合併
49 分鐘
30 天內合併 PR
9

描述

I've tried to run
`gradle release -Prelease.versionIncrementer=incrementPatch`
on a remote machine where I'm loggedin with ssh and forwarded agent

`ssh-add -l` shows my identities but when I run the mentioned command it ends with.

```
> Task :some-fancy-lib:verifyRelease
Looking for uncommitted changes..
Checking if branch is ahead of remote..
Checking for snapshot versions..

> Task :some-fancy-lib:release FAILED
Creating tag: v1.3.2
Pushing all to remote: origin
Exception occurred during push: org.eclipse.jgit.api.errors.TransportException: ssh://git@gitlab.fancycompany.de:2222/development/libs/some-fancy-lib.git: Auth fail for methods 'publickey'

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':some-fancy-lib:release'.
> org.eclipse.jgit.api.errors.TransportException: ssh://git@gitlab.fancycompany.de:2222/development/libs/some-fancy-lib.git: Auth fail for methods 'publickey'

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.

BUILD FAILED in 861ms
2 actionable tasks: 2 executed

```

copying my private key to the remote-machine and setting
```
release.customKeyFile=/home/fancyuser/.ssh/id_ed25519
release.customKeyPassword=
```
works, but I don't want to distribute my private key on each machine.

Is there something I can do to force the usage of a specific forwarded identity?

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。