Unable to load/clone model with CLI

Started by Martine, February 17, 2023, 11:22:01 AM

Previous topic - Next topic

Martine

Hello,

I'm work on Windows, using coArchi plugin 0.8.7 and Archi 4.10
I try to load a model from Azure Devops Git and generate HTML report using Command line.
It is not working with HTTP/username (I thing because it is HTTPS).
So I try to use SSH.
Apparently Azure Git only takes RSA keys
So, I generated an RSA SSH key with PuTTY tool. I put it in a text file named "cleSSH.txt" and I added the key to Azure Git

Then I use the following command line:
Archi  -application com.archimatetool.commandline.app -consoleLog -nosplash -p --modelrepository.cloneModel "git@ssh.dev.azure.com:xxxxxxxxxxxxxxxxxx"   --modelrepository.identityFile  "C:\Users\MILETTO\Documents\SCP - NO BACKUP\Archi\cleSSH.txt" --modelrepository.loadModel "C:\Users\MILETTO\Documents\SCP - NO BACKUP\Archi" --html.createReport "C:\Users\MILETTO\Documents\SCP - NO BACKUP\Archi\ArchiHTML"

I then receive an error log containing "......cleSSH.txt': file not found"
and when I look to the directory where the file where stored, it disappeared !

I restarted the process several times and it happens always the same : error + deleted SSH file...

Did I miss something ? Can anyone help me?
Thanks!
Martine

Phil Beauvoir

Hi Martine, I don't know how Azure Git works with SSH. But the usual method of creating an SSH key is as described here:

https://github.com/archimatetool/archi-modelrepository-plugin/wiki/SSH-Authentication

You shouldn't put the key file in the same directory as the model, as this directory is deleted at first when importing. Store it somewhere else.

Regards,

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.

Martine

Hello Phil,
Thank you very much for your quick answer. I have already gone through the documentation, and I think I'm doing the right thing, but you never know... I'll double-check everything...
Thank you for the information on the deleted directory, it's already a mystery solved :-)
I'm going to try again with another directory and I'll keep you informed.
Best regards
Martine

Martine

Hello Phil,
just for information, I had to abandon the SSH. I understand that the GIT azure only accepts RSA while the Archi command generates edDSA, but nothing sure, I just imagine that by reading the log:

[LoadModelFromRepositoryProvider] Cloning from git@ssh.dev.azure.comxxxxx to xxxxx
[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
[sshd-JGitSshClient[288cdaab]-nio2-thread-7] WARN org.eclipse.jgit.internal.transport.sshd.CachingKeyPairProvider - No keys found in identity C:\Users\MILETTO\.ssh\cleSSH.ppk



So I returned to HTML, and after my password file was no longer erased when generating the model  ;) , I was able to generate a token on the GIT, and use it as indicated on the command mode documentation.
It works correctly and I have an HTML report which seems correct to me, however there are errors in the log. Maybe you can tell me if it's normal? (I attach the log)
Thank you again for your help.
Regards,
Martine

Phil Beauvoir

Hi Martine,

thanks for the information. You can ignore those messages in the log, they won't affect the report. :-)

Regards,

Phil
If you value and use Archi, please consider making a donation!
Ask your ArchiMate related questions to the ArchiMate Community's Discussion Board.