Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TransportException Auth fail on pushing tag since version 1.9.3 #270

Closed
pula2000 opened this issue Nov 8, 2018 · 11 comments
Closed

TransportException Auth fail on pushing tag since version 1.9.3 #270

pula2000 opened this issue Nov 8, 2018 · 11 comments

Comments

@pula2000
Copy link

pula2000 commented Nov 8, 2018

When running gradle release in my project locally I get the following error -
Working on released version 1.0.3, nothing to release
Pushing all to remote: origin
Exception occurred during push: org.eclipse.jgit.api.errors.TransportException:
ssh://git-codecommit.us-east-1.amazonaws.com/...: invalid privatekey: [B@566b395b

I am able to access aws code commit otherwise normally.

@adamdubiel
Copy link
Member

Can you show the command/configuration of axion that you use? Are you pushing "by hand" using the same auht method? (private key)

@pula2000
Copy link
Author

pula2000 commented Nov 9, 2018

plugins {
id 'pl.allegro.tech.build.axion-release' version '1.9.3'
}

scmVersion {
checks {
uncommittedChanges = false
}
tag {
prefix = ''
}
}
group 'com....''
project.version = scmVersion.version

Command is - gradle release after "gradle clean build" was executed
Even ran - "gradle release -Prelease.dryRun" in prior and that ran fine

Otherwise normally when I do git push/pull/clone with code commit it works fine. It seems to be failing when its trying to push the local tag.

@adamdubiel
Copy link
Member

I think it might be connected with lack of ssh-agent support in 1.9.x versions (i just tried to fix it, see: #226), can you try with axion-release 1.8.1? If it works, it is definitely due to #226.

@adamdubiel
Copy link
Member

I just published 1.10.0 version - can you try it out?

@CBrophy
Copy link

CBrophy commented Dec 12, 2018

Hello! My team has also run into this error, and we've narrowed it down to a recent change to OpenSSH keygen https://www.openssh.com/txt/release-7.8

  • ssh-keygen(1): write OpenSSH format private keys by default
    instead of using OpenSSL's PEM format. The OpenSSH format,
    supported in OpenSSH releases since 2014 and described in the
    PROTOCOL.key file in the source distribution, offers substantially
    better protection against offline password guessing and supports
    key comments in private keys. If necessary, it is possible to write
    old PEM-style keys by adding "-m PEM" to ssh-keygen's arguments
    when generating or updating a key.

Generating a key using -m pem does indeed fix the problem. I don't know groovy or I would offer to attempt and submit a fix. Hopefully this is helpful.

@adamdubiel
Copy link
Member

Looks like a great clue - i will try to work on it.

@ppeg34
Copy link

ppeg34 commented Jul 23, 2019

Thanks, @CBrophy, for this lead.

@dougmaitelli
Copy link

Any updates on this?

@Xawery94
Copy link

Xawery94 commented Oct 2, 2019

The problems occurs because ssh-agent has no identities. You need to add this after generating your ssh key. You can do this by

ssh-add

After that you can check if ssh-agent now has identities by

ssh-agent -l

After that process all should be good, it worked for me :)

@ddietterich
Copy link

Any updates on this?

@Farix1337
Copy link

Farix1337 commented May 4, 2020

I worked around the the problem for windows 10 by using the git bash and ensuring that the ssh-agent is automatically running as described in: https://help.github.com/en/github/authenticating-to-github/working-with-ssh-key-passphrases#auto-launching-ssh-agent-on-git-for-windows
But that means i need to call gradle via the git bash not via IDE internal tools =/

@bgalek bgalek closed this as not planned Won't fix, can't repro, duplicate, stale Feb 16, 2024
@bgalek bgalek reopened this Feb 16, 2024
@bgalek bgalek closed this as completed Feb 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants