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

Ament, Add Signed-off-by, Add Change-Id and SignCommit deactivated after commit. #52

Open
Sduniii opened this issue Aug 28, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@Sduniii
Copy link

Sduniii commented Aug 28, 2024

Version

6.8.0

Operating System

Linux/Unix, Windows

Eclipse version

2024-03

Bug description

"Commit Message" options deactivated after commit fail. This results, for example, in multiple added Change-Ids after activating the box again.

Actual behavior

Ament, Add Signed-off-by, Add Change-Id and SignCommit deactivated after commit. This results in unexpected effects.

Expected behavior

Nothing unchecked after a commit fail.

Relevant log output

No response

Other information

No response

@Sduniii Sduniii added the bug Something isn't working label Aug 28, 2024
@msohn
Copy link
Member

msohn commented Aug 29, 2024

If commit failed there should be some errors in the Eclipse error log. Please check the error log and post them here.

@Sduniii
Copy link
Author

Sduniii commented Sep 2, 2024

I intentionally entered my password incorrectly here:

org.eclipse.jgit.api.errors.JGitInternalException: Failed to parse secret key file xxx.key. Is the entered passphrase correct? at org.eclipse.jgit.gpg.bc.internal.BouncyCastleGpgSigner.signObject(BouncyCastleGpgSigner.java:211) at org.eclipse.jgit.api.CommitCommand.sign(CommitCommand.java:336) at org.eclipse.jgit.api.CommitCommand.call(CommitCommand.java:283) at org.eclipse.egit.core.op.CommitOperation.commit(CommitOperation.java:259) at org.eclipse.egit.core.op.CommitOperation$1.run(CommitOperation.java:211) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2448) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2473) at org.eclipse.egit.core.op.CommitOperation.execute(CommitOperation.java:220) at org.eclipse.egit.ui.internal.commit.CommitJob.run(CommitJob.java:135) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63) Caused by: org.bouncycastle.openpgp.PGPException: Failed to parse secret key file xxx.key. Is the entered passphrase correct? at org.eclipse.jgit.gpg.bc.internal.BouncyCastleGpgKeyLocator.findSecretKeyForKeyBoxPublicKey(BouncyCastleGpgKeyLocator.java:521) at org.eclipse.jgit.gpg.bc.internal.BouncyCastleGpgKeyLocator.findSecretKey(BouncyCastleGpgKeyLocator.java:400) at org.eclipse.jgit.gpg.bc.internal.BouncyCastleGpgSigner.locateSigningKey(BouncyCastleGpgSigner.java:120) at org.eclipse.jgit.gpg.bc.internal.BouncyCastleGpgSigner.signObject(BouncyCastleGpgSigner.java:146) ... 9 more Caused by: org.bouncycastle.openpgp.PGPException: Cannot create cipher to decrypt: mac check in OCB failed at org.eclipse.jgit.gpg.bc.internal.keys.OCBPBEProtectionRemoverFactory$1.recoverKeyData(OCBPBEProtectionRemoverFactory.java:112) at org.eclipse.jgit.gpg.bc.internal.keys.SExprParser.extractData(SExprParser.java:430) at org.eclipse.jgit.gpg.bc.internal.keys.SExprParser.processRSASecretKey(SExprParser.java:724) at org.eclipse.jgit.gpg.bc.internal.keys.SExprParser.parseSecretKey(SExprParser.java:217) at org.eclipse.jgit.gpg.bc.internal.keys.SecretKeys.readSecretKey(SecretKeys.java:152) at org.eclipse.jgit.gpg.bc.internal.BouncyCastleGpgKeyLocator.attemptParseSecretKey(BouncyCastleGpgKeyLocator.java:180) at org.eclipse.jgit.gpg.bc.internal.BouncyCastleGpgKeyLocator.findSecretKeyForKeyBoxPublicKey(BouncyCastleGpgKeyLocator.java:516) ... 12 more Caused by: javax.crypto.AEADBadTagException: mac check in OCB failed at java.base/jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:62) at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:502) at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:486) at org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher$AEADGenericBlockCipher.doFinal(Unknown Source) at org.bouncycastle.jcajce.provider.symmetric.util.BaseBlockCipher.engineDoFinal(Unknown Source) at java.base/javax.crypto.Cipher.doFinal(Cipher.java:2190) at org.eclipse.jgit.gpg.bc.internal.keys.OCBPBEProtectionRemoverFactory$1.recoverKeyData(OCBPBEProtectionRemoverFactory.java:93) ... 18 more

And, for example, if a commit hook fails, no exception is thrown, but the symbols are also deactivated. After activate "Signed-off-by" again a second line of same text added. I need to deactivate it twice to delete both lines. And its really annoying and user unfriendly to activate the signing again.

@msohn
Copy link
Member

msohn commented Sep 3, 2024

  • I don't understand what you tried, please provide detailed steps to reproduce.
  • Note that git hooks are not yet supported on Windows.
  • Did you try with the latest release 6.10.0 (Eclipse 2024-06) ?

@Sduniii
Copy link
Author

Sduniii commented Sep 3, 2024

  1. activate the buttons:
    egit1

  2. after commit, commit hook fails, because of intentionally wrong entered message format
    egit2

  3. buttons are deactivated:
    egit3
    I activate the "Signed off" again to show you the second line. Then, i need to deactivate it twice to delete the Signed-off lines.

It's also in version 7.0.0. I deleted the line


in my own build to test it, and it works like expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants