archimatetool / archi-modelrepository-plugin

coArchi - a plug-in to share and collaborate on Archi models.
153 stars 52 forks source link

Add model to existing repository SSH, not possible #158

Closed szaluzhskiy closed 3 years ago

szaluzhskiy commented 3 years ago

Version of Archi, Operating System

Version 4.7.1 Build 202007151058 Windows 10

Version of this plug-in

0.6.2.202004031233

Any other plug-ins installed?

no

Expected Behaviour

Create model locally. Call Add local model to Workspace and publish Then publish model

Actual Behaviour

Error invalid privatekey

Steps to Reproduce the Behaviour

  1. Create model, add some elements and views
  2. Create new GIT repository on external resource (Bitbicket, gitlab, any)
  3. Go to Archi select Add Local Model to Workspace and Publish
  4. Press button publish
  5. Error invalid privatekey

I was trying to change key via configuration... but this does not help

szaluzhskiy commented 3 years ago

I foolowed doc chapter Add local model to Workspace

waacot commented 3 years ago

Hello @szaluzhskiy,

I use to work with HTTPS, but after a short try on my github repository, it seems to work fine. I previously add my generate private key on Github to authorize SSH handshake between Archi(c) and github. From a terminal console, have you tried a simple "git clone git@github.com:waacot/archi-test1.git" on a temporary directory. Of course replace : git@github.com:waacot/archi-test1.git by your own git repo ;-) Regards, Laurent

szaluzhskiy commented 3 years ago

@waacot Yes, I try to check out git repo to local folder and then "Add Local model to workspace and Publish". image

szaluzhskiy commented 3 years ago

Btw I did a check with GitHub repository and result is the same, I mean same error in Archi.

Phillipus commented 3 years ago

Make sure you follow the instructions here when setting up SSH:

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

szaluzhskiy commented 3 years ago

Looks like my GIT repository (corporative one), does not support PEM keys. Is it possible to use RSA key pair like this?

ssh-keygen -t rsa -b 2048

Phillipus commented 3 years ago

Is it possible to use RSA key pair like this?

I don't know, did you try? coArchi uses the JSch SSH library which is quite old:

http://www.jcraft.com/jsch/

For coArchi 2 we might consider using the Apache Mina SSHD library which I think supports more SSH key types. Needs more investigation.

Phillipus commented 3 years ago

Might be some useful info here - https://stackoverflow.com/questions/53134212/invalid-privatekey-when-using-jsch

szaluzhskiy commented 3 years ago

If configure key with instruction - https://github.com/archimatetool/archi-modelrepository-plugin/wiki/SSH-Authentication then it's working. You can close the issue. Thanks for support!

Phillipus commented 3 years ago

You can close the issue.