Recently updated my Archi report publishing server from 4.8 (might have been 4.7) to 4.10 and coArchi 0.8.5 and now ACLI script is failing to clone and HTML publish my remote repo. Any ideas what I failed to update?
e:\Archi4\archi.exe -application com.archimatetool.commandline.app -consoleLog -nosplash --modelrepository.cloneModel "ssh://git@hostname:7999/ar-ds/archimate-tvp-ds.git" --modelrepository.loadModel "C:\Users\Username\AppData\Roaming\Archi4\model-repository\ds-1" --modelrepository.identityFile "C:\Users\Username\.ssh\id_rsa" --html.createReport "E:\WAMP\www\diagrams\tvp-ds"
[LoadModelFromRepositoryProvider] Cloning from ssh://git@hostname:7999/ar-ds/archimate-tvp-ds.git to C:\Users\username\AppData\Roaming\Archi4\model-repository\ds-1
java.lang.NullPointerException
at org.archicontribs.modelrepository.authentication.UsernamePassword.<init>(UsernamePassword.java:21)
at org.archicontribs.modelrepository.commandline.LoadModelFromRepositoryProvider.run(LoadModelFromRepositoryProvider.java:127)
at com.archimatetool.commandline.CentralScrutinizer.runProviderOptions(CentralScrutinizer.java:164)
at com.archimatetool.commandline.CentralScrutinizer.start(CentralScrutinizer.java:82)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:136)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:402)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:596)
at org.eclipse.equinox.launcher.Main.run(Main.java:1467)
Seems that I can't add the remote repo via the UI either... not much to go by here. Thoughts?
(https://i.imgur.com/JoqG7O2.png)
Did you set the option:
--modelrepository.passFile
to reference a file containing the password for the ssh file? Or maybe the ssh file doesn't need a password?
Also, you may need to set the password for that ssh file in Archi's preferences if it requires one.
Edit - I think there are two issues here. I can fix the ACLI NPE. The second issues is something else.
Another thing - you could try to use id_ecdsa instead of id_rsa for the key
Yup, passFile worked, however, the script is now starting with this error. Not sure why it would be looking into writing to S: since that is my secure directory.
[LoadModelFromRepositoryProvider] Cloning from ssh://git@hostname:7999/ar-ds/archimate-tvp-ds.git to C:\Users\Username\AppData\Roaming\Archi4\model-repository\ds-1
[JGit-FileStoreAttributeWriter-2] ERROR org.eclipse.jgit.util.FS - Cannot save config file 'FileBasedConfig[S:\.config\jgit\config]'
java.io.IOException: Creating directories for S:\.config\jgit failed
at org.eclipse.jgit.util.FileUtils.mkdirs(FileUtils.java:412)
at org.eclipse.jgit.internal.storage.file.LockFile.lock(LockFile.java:140)
at org.eclipse.jgit.storage.file.FileBasedConfig.save(FileBasedConfig.java:219)
at org.eclipse.jgit.util.FS$FileStoreAttributes.saveToConfig(FS.java:744)
at org.eclipse.jgit.util.FS$FileStoreAttributes.lambda$4(FS.java:430)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
[main] INFO org.apache.sshd.common.util.security.eddsa.EdDSASecurityProviderRegistrar - getOrCreateProvider(EdDSA) created instance of net.i2p.crypto.eddsa.EdDSASecurityProvider
[main] INFO org.apache.sshd.common.io.DefaultIoServiceFactoryFactory - No detected/configured IoServiceFactoryFactory using Nio2ServiceFactoryFactory
[LoadModelFromRepositoryProvider] Model cloned!
[LoadModelFromRepositoryProvider] Loading model at C:\Users\Username\AppData\Roaming\Archi4\model-repository\ds-1
...
I'll have to look into id_ecdsa. Any functional differences with id_rsa?
It seems that JGit is writing to this file in later versions. See:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=560555
https://github.com/git-commit-id/git-commit-id-maven-plugin/issues/566
https://stackoverflow.com/questions/65731005/jgit-throws-java-io-ioexception-creating-directories-for-config-jgit-failed
It might be safe to ignore the exception or you could set write access or set XDG_CONFIG_HOME?
> I'll have to look into id_ecdsa. Any functional differences with id_rsa?
Some hosts no longer support id_rsa.
I've just released coArchi 0.8.6.
This should fix the NPE in the ACLI if no password file is set with the --modelrepository.passFile option. Also some internal fixes.
https://www.archimatetool.com/plugins/#coArchi