Reputation: 47407
I've installed gitblit on a local server and can't figure out why I can't run the "Authority" key generator.
It's failing with
C:\Program Files (x86)\gitblit>authority INFO Using JCE Unlimited Strength Jurisdiction Policy files ${baseFolder} set to C:\Program Files (x86)\gitblit\data Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.gitblit.authority.GitblitAuthority.load(GitblitAuthority.java:305 ) at com.gitblit.authority.GitblitAuthority.initialize(GitblitAuthority.ja va:193) at com.gitblit.authority.GitblitAuthority$1.run(GitblitAuthority.java:16 3) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$200(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.awt.EventQueue$3.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour ce) at java.awt.EventQueue.dispatchEvent(Unknown Source) at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread.run(Unknown Source)
C:\Program Files (x86)\gitblit>
and this is both with the service running and the service stopped. I'm completely stumped on how to get an SSH key generated and usable on my system.
On a side note, if/when I get this bit working, how do you install it side-by-side with another git ssh key (github) in Windows, to be used with Powershell?
Upvotes: 1
Views: 1202
Reputation: 1327004
The code which triggers that exception is this one:
config.load();
// replace user certificate model with actual data
List<UserCertificateModel> list = UserCertificateConfig.KEY.parse(config).list;
for (UserCertificateModel ucm : list) {
ucm.user = userService.getUserModel(ucm.user.username);
map.put(ucm.user.username, ucm);
}
So the config must contain something fishy, which returns a 'null
' ucm.user
.
Side note: using several kind of ssh keys is done using an ssh config file, as shown in "How to change git ssh user for a remote push temporarily?".
Upvotes: 1