Home > Back-end >  For help: jgit commit () call () error is solved
For help: jgit commit () call () error is solved

Time:05-07

Do use jgit 5.3.0 git commit operation:

 
Git Git=Git. Open (new File (repoDir. GetAbsolutePath ()));
CredentialsProvider CredentialsProvider=new UsernamePasswordCredentialsProvider (" PRIVATE - TOKEN ", privateToken);
String filepattern="README. Md";
Git. The add (). AddFilepattern (filepattern). The call ();//git. The add (). AddFilepattern (". "). The call ();
Git. The add (). SetUpdate (true);
Git.com MIT (.) setCommitter (" aaa ", "[email protected]"). The setMessage (remark). The call ();



In the last sentence complains:
 
The Exception in the thread "main" Java. Lang. NoClassDefFoundError: org/bouncycastle/openpgp/PGPException
The at org. Eclipse. Jgit. Lib. GpgSigner. & lt; Clinit> (GpgSigner. Java: 58)
At org.eclipse.jgit.api.Com mitCommand. ProcessOptions (CommitCommand. Java: 611)
At org.eclipse.jgit.api.Com mitCommand. Call (195) CommitCommand. Java:
At com. Afei. Main. The Main (50). The Main Java:
Under Caused by: Java. Lang. ClassNotFoundException: org. Bouncycastle. Openpgp. PGPException
The at java.net.URLClassLoader$1.run URLClassLoader. Java: (372)
The at java.net.URLClassLoader$1.run URLClassLoader. Java: (361)
The at Java. Security. The AccessController. DoPrivileged (Native Method)
The at java.net.URLClassLoader.findClass URLClassLoader. Java: (360)
The at Java. Lang. This. LoadClass (424). This Java:
At sun. Misc. The Launcher $AppClassLoader. LoadClass (308). The Launcher Java:
The at Java. Lang. This. LoadClass (357). This Java:
. 4 more
The Process finished with exit code 1


which under the great god help solve?

CodePudding user response:

Then solved?
Prev:java
Next:java
  • Related