Unable to git commit changes with GPG signing
Apache NetBeans version
Apache NetBeans 14
What happened
I tried all instruction for Windows, but it doesn't work in NB, work fine manually in cmd with -S flag on commit. NB show messegebox with error "org.eclipse.jgit.api.errors.JGitInternalException: missing credentials provider" and thats all.
How to reproduce
No response
Did this work correctly in an earlier version?
No / Don't know
Operating System
Windows 8, 10
JDK
17, 1.8
Apache NetBeans packaging
Apache NetBeans binary zip
Anything else
Was pull request, not my https://github.com/apache/netbeans/pull/2103
Are you willing to submit a pull request?
No
Code of Conduct
Yes
Please can you share the full stack trace from the exception?
Linking up https://issues.apache.org/jira/browse/NETBEANS-3972
A part of C:\Users\user\AppData\Roaming\NetBeans\14\var\log\messages.log
INFO [org.netbeans.modules.git]: org.eclipse.jgit.api.errors.JGitInternalException: missing credentials provider
org.bouncycastle.openpgp.PGPException: missing credentials provider
at org.eclipse.jgit.lib.internal.BouncyCastleGpgKeyPassphrasePrompt.getPassphrase(BouncyCastleGpgKeyPassphrasePrompt.java:87)
at org.eclipse.jgit.lib.internal.BouncyCastleGpgKeyLocator.findSecretKeyForKeyBoxPublicKey(BouncyCastleGpgKeyLocator.java:438)
at org.eclipse.jgit.lib.internal.BouncyCastleGpgKeyLocator.findSecretKey(BouncyCastleGpgKeyLocator.java:335)
at org.eclipse.jgit.lib.internal.BouncyCastleGpgSigner.locateSigningKey(BouncyCastleGpgSigner.java:91)
at org.eclipse.jgit.lib.internal.BouncyCastleGpgSigner.sign(BouncyCastleGpgSigner.java:100)
Caused: org.eclipse.jgit.api.errors.JGitInternalException: missing credentials provider
at org.eclipse.jgit.lib.internal.BouncyCastleGpgSigner.sign(BouncyCastleGpgSigner.java:129)
at org.eclipse.jgit.api.CommitCommand.call(CommitCommand.java:242)
at org.netbeans.libs.git.jgit.commands.CommitCommand.run(CommitCommand.java:138)
Caused: org.netbeans.libs.git.GitException
at org.netbeans.libs.git.jgit.commands.CommitCommand.run(CommitCommand.java:153)
at org.netbeans.libs.git.jgit.commands.GitCommand$1.run(GitCommand.java:57)
at org.netbeans.libs.git.jgit.commands.GitCommand$1.run(GitCommand.java:54)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at org.netbeans.libs.git.jgit.commands.GitCommand.execute(GitCommand.java:54)
at org.netbeans.libs.git.GitClient.commit(GitClient.java:480)
at org.netbeans.modules.git.client.GitClient$9.call(GitClient.java:297)
at org.netbeans.modules.git.client.GitClient$9.call(GitClient.java:293)
at org.netbeans.modules.git.client.GitClient$CommandInvoker$1$1.call(GitClient.java:933)
at org.netbeans.modules.git.client.GitClient$CommandInvoker$1.call(GitClient.java:956)
at org.netbeans.modules.git.FilesystemInterceptor.runWithoutExternalEvents(FilesystemInterceptor.java:473)
at org.netbeans.modules.git.Git.runWithoutExternalEvents(Git.java:259)
at org.netbeans.modules.git.client.GitClient$CommandInvoker.runMethodIntern(GitClient.java:966)
at org.netbeans.modules.git.client.GitClient$CommandInvoker.runMethod(GitClient.java:893)
at org.netbeans.modules.git.client.GitClient$CommandInvoker.access$300(GitClient.java:869)
at org.netbeans.modules.git.client.GitClient.commit(GitClient.java:293)
at org.netbeans.modules.git.ui.commit.CommitAction$CommitProgressSupport.commit(CommitAction.java:343)
[catch] at org.netbeans.modules.git.ui.commit.CommitAction$CommitProgressSupport.perform(CommitAction.java:234)
at org.netbeans.modules.git.client.GitProgressSupport.performIntern(GitProgressSupport.java:92)
at org.netbeans.modules.git.client.GitProgressSupport.run(GitProgressSupport.java:85)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
Can you also try NetBeans 13 and see if that behaves any differently?
I don't want to repeat this on NB 13, just believe me, I had the same problem and error
org.eclipse.jgit.api.errors.JGitInternalException: missing credentials provider
Thanks. Yes, I'd already edited out the comment about NetBeans 13 - mistaken for a different issue.
This is also affecting NB 15. Stack trace:
INFO [org.netbeans.modules.git]: org.eclipse.jgit.api.errors.JGitInternalException: missing credentials provider
org.bouncycastle.openpgp.PGPException: missing credentials provider
at org.eclipse.jgit.lib.internal.BouncyCastleGpgKeyPassphrasePrompt.getPassphrase(BouncyCastleGpgKeyPassphrasePrompt.java:87)
at org.eclipse.jgit.lib.internal.BouncyCastleGpgKeyLocator.findSecretKeyForKeyBoxPublicKey(BouncyCastleGpgKeyLocator.java:438)
at org.eclipse.jgit.lib.internal.BouncyCastleGpgKeyLocator.findSecretKey(BouncyCastleGpgKeyLocator.java:335)
at org.eclipse.jgit.lib.internal.BouncyCastleGpgSigner.locateSigningKey(BouncyCastleGpgSigner.java:91)
at org.eclipse.jgit.lib.internal.BouncyCastleGpgSigner.sign(BouncyCastleGpgSigner.java:100)
Caused: org.eclipse.jgit.api.errors.JGitInternalException: missing credentials provider
at org.eclipse.jgit.lib.internal.BouncyCastleGpgSigner.sign(BouncyCastleGpgSigner.java:129)
at org.eclipse.jgit.api.CommitCommand.call(CommitCommand.java:242)
at org.netbeans.libs.git.jgit.commands.CommitCommand.run(CommitCommand.java:138)
Caused: org.netbeans.libs.git.GitException
at org.netbeans.libs.git.jgit.commands.CommitCommand.run(CommitCommand.java:153)
at org.netbeans.libs.git.jgit.commands.GitCommand$1.run(GitCommand.java:57)
at org.netbeans.libs.git.jgit.commands.GitCommand$1.run(GitCommand.java:54)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:569)
at org.netbeans.libs.git.jgit.commands.GitCommand.execute(GitCommand.java:54)
at org.netbeans.libs.git.GitClient.commit(GitClient.java:480)
at org.netbeans.modules.git.client.GitClient$9.call(GitClient.java:297)
at org.netbeans.modules.git.client.GitClient$9.call(GitClient.java:293)
at org.netbeans.modules.git.client.GitClient$CommandInvoker$1$1.call(GitClient.java:933)
at org.netbeans.modules.git.client.GitClient$CommandInvoker$1.call(GitClient.java:956)
at org.netbeans.modules.git.FilesystemInterceptor.runWithoutExternalEvents(FilesystemInterceptor.java:473)
at org.netbeans.modules.git.Git.runWithoutExternalEvents(Git.java:259)
at org.netbeans.modules.git.client.GitClient$CommandInvoker.runMethodIntern(GitClient.java:966)
at org.netbeans.modules.git.client.GitClient$CommandInvoker.runMethod(GitClient.java:893)
at org.netbeans.modules.git.client.GitClient$CommandInvoker.access$300(GitClient.java:869)
at org.netbeans.modules.git.client.GitClient.commit(GitClient.java:293)
at org.netbeans.modules.git.ui.commit.CommitAction$CommitProgressSupport.commit(CommitAction.java:343)
[catch] at org.netbeans.modules.git.ui.commit.CommitAction$CommitProgressSupport.perform(CommitAction.java:234)
at org.netbeans.modules.git.client.GitProgressSupport.performIntern(GitProgressSupport.java:92)
at org.netbeans.modules.git.client.GitProgressSupport.run(GitProgressSupport.java:85)
at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:1418)
at org.netbeans.modules.openide.util.GlobalLookup.execute(GlobalLookup.java:45)
at org.openide.util.lookup.Lookups.executeWith(Lookups.java:278)
at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:2033)
This error has existed since NB 11.+ https://issues.apache.org/jira/browse/NETBEANS-3979 https://issues.apache.org/jira/browse/NETBEANS-3972
Hope someone could fix it because it will become a big problem in the future!
Why this not fixed yet? 16 version still not working with it. I saw, somebody had a pull request for it (https://github.com/apache/netbeans/pull/2103). Please fix this as fast as possible.
@hotis simply because no-one has shown interest in completing that pull request or implementing an alternative fix.
Same problem with NB18. I just installed it (NB I mean), usially working with eclipse... possible mess between eclipse and NB ?
NetBeans 19, and the issue still exists. Had to go global config and change signed commit from true to false.