Gitblit 版本:1.3.2
情況:
執行 authority.cmd 可開啟視窗界面,用來設定 Git 帳號的 SSL 憑證。 假設系統有一個 Git 帳號,例如為 xyz,曾經使用 authority.cmd 設定了 xyz 的 SSL 憑證,後來在網頁管理介面,刪除了 xyz 這個帳號。 之後,authority.cmd 便無法開啟了。會出現以下錯誤訊息。
D:\gitblit>authority.cmd INFO Using JCE Standard Encryption Policy files, encryption key lengths will be limited ${baseFolder} set to D:\gitblit\data Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at com.gitblit.authority.GitblitAuthority.load(GitblitAuthority.java:302) at com.gitblit.authority.GitblitAuthority.initialize(GitblitAuthority.java:193) at com.gitblit.authority.GitblitAuthority$1.run(GitblitAuthority.java:163) at java.awt.event.InvocationEvent.dispatch(Unknown Source) at java.awt.EventQueue.dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$400(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 Source) 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)
解決方式:
這是因為刪除 xyz 這個帳號後,D:\gitblit\data\certs\authority.conf 這個檔案裡面,還存有 xyz 的資料。 只要將 authority.conf 裡面屬於 xyz 的設定刪除即可。 要刪除的資料格式如下
[user "xyz"] expires = 2025-01-20T00:00:00+0800
沒有留言:
張貼留言