axion-release-plugin icon indicating copy to clipboard operation
axion-release-plugin copied to clipboard

Invalid private key

Open peterfigure opened this issue 4 years ago • 17 comments

* What went wrong:
Execution failed for task ':release'.
> org.eclipse.jgit.api.errors.TransportException: [email protected]/xx.git: invalid privatekey: [B@52771620

looks like the issue might be related to: https://bugs.eclipse.org/bugs/show_bug.cgi?id=520927 - I'm using ed25519 private keys. looks like it was resolved a while ago but have to use the MINA ssh dependency: https://wiki.eclipse.org/JGit/New_and_Noteworthy/5.2 (org.eclipse.jgit:org.eclipse.jgit.ssh.apache).

any chance of switching? elliptic curve keys are very much recommended over RSA these days...

peterfigure avatar May 26 '21 17:05 peterfigure

hi! @peterfigure sure thing!

bgalek avatar May 26 '21 23:05 bgalek

@peterfigure wanna try to make PR with this update? ;)

bgalek avatar May 26 '21 23:05 bgalek

I'll try to find some time over the weekend but can't promise anything, also, I don't know Groovy 😳

peterfigure avatar May 27 '21 19:05 peterfigure

fingers crossed! :)

bgalek avatar May 27 '21 22:05 bgalek

@bgalek I'm affected by this as well. Any chance you can fix that?

jdomag avatar Aug 04 '21 17:08 jdomag

I'll check it this weekend!

bgalek avatar Aug 04 '21 22:08 bgalek

@bgalek Any progress on this one?

jdomag avatar Aug 09 '21 06:08 jdomag

sorry to keep you wait! @peterfigure @jdomag as I understand https://github.com/allegro/axion-release-plugin/pull/414 this could resolve the issue? could you test it out with your ed25519 key?

bgalek avatar Aug 09 '21 07:08 bgalek

Hey @bgalek, I'm encountering this "invalid private key" issue, probably due to my ed25519 key. I'm running plugin version 1.13.6, which includes #414, so looks like its not fixed yet.

big-andy-coates avatar Nov 17 '21 22:11 big-andy-coates

Hi, I'm aware :( I've started a complex fix for all ssh related problems, but I've didn't find any time to finish it up :( You can check progress here https://github.com/allegro/axion-release-plugin/pull/416

bgalek avatar Nov 17 '21 23:11 bgalek

Great stuff.

And… great plug-in by the way!

On Wed, 17 Nov 2021 at 23:15, Bartosz Gałek @.***> wrote:

Hi, I'm aware :( I've started a complex fix for all ssh related problems, but I've didn't find any time to finish it up :( You can check progress here #416 https://github.com/allegro/axion-release-plugin/pull/416

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/allegro/axion-release-plugin/issues/401#issuecomment-972251713, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB5EE3R2LN4666II3GJIZ5DUMQZQLANCNFSM45SQDGRQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

big-andy-coates avatar Nov 18 '21 09:11 big-andy-coates

@bgalek I'm running into this issue. It seems to be an issue with the SSH key type. I use ed25519. Is there a way to use your build from #416 or are you still working on it?

bethdehart avatar Dec 25 '21 21:12 bethdehart

@jamesdehart i have same issue. Did you solve this problem?

sssshong avatar Dec 30 '21 08:12 sssshong

unfortunately not yet - if anyone wants to jump into https://github.com/allegro/axion-release-plugin/pull/416 feel free I'm waiting for some vacation days to sit on this problem and I finally finish it!

bgalek avatar Dec 30 '21 09:12 bgalek

Any update on this?

ramesh-vangala avatar Apr 27 '22 11:04 ramesh-vangala

hi @ramesh-vangala unfortunately not yet, but I'm going to make new release soon with another fix that may be help with this issue, but if you want to contribute to #416 that would be awesome ;)

bgalek avatar Apr 27 '22 13:04 bgalek

hello, I'm running into this issue:

16:51:29  + ./gradlew markNextVersion -Prelease.incrementer=incrementMinor -Prelease.customKeyFile=****
16:51:30  
16:51:30  > Task :markNextVersion FAILED
16:51:30  Creating next version marker tag: client/-0.2.0-alpha
16:51:30  Pushing all to remote: origin
16:51:30  Exception occurred during push: org.eclipse.jgit.api.errors.TransportException: [email protected]:myrepo.git: invalid privatekey: [B@5d0fd7ec
16:51:30  
16:51:30  FAILURE: Build failed with an exception.
16:51:30  
16:51:30  * What went wrong:
16:51:30  Execution failed for task ':markNextVersion'.
16:51:30  > org.eclipse.jgit.api.errors.TransportException: [email protected]:myrepo.git: invalid privatekey: [B@5d0fd7ec

this happens on my jenkins node. I'm using withCredentials([sshUserPrivateKey(credentialsId: 'credsId', keyFileVariable: 'SSH_FILE')]) after finding out that ssh-agent is not working.

anekrasov-dr avatar May 06 '22 14:05 anekrasov-dr

@bgalek is there any workaround for this. With changes on github using axion-release-plugin is impossible

rw-LukaszPrzybyla avatar Dec 15 '22 22:12 rw-LukaszPrzybyla

This is still a problem - https://github.com/allegro/axion-release-plugin/pull/416 was closed with a comment that updated jgit may fix this, but jgit still requires using a different SSH backend to support these other keys.

onyxraven avatar May 16 '23 23:05 onyxraven

@onyxraven exactly, this PR will need more work then I anticipated, maybe you would like to contribute? This draft is valid, but there are so migrations needed.

bgalek avatar May 17 '23 06:05 bgalek

Should work now :)

bgalek avatar Feb 16 '24 06:02 bgalek