SSH Authentication - archimatetool/archi-modelrepository-plugin GitHub Wiki

SSH

coArchi supports SSH authentication as well as username/password authentication for HTTPS connections.

This requires the user to do some manual configuration outside of Archi.

SSH or HTTPS?

Please read this - https://help.github.com/en/articles/which-remote-url-should-i-use

Setting up private and public keys

Here's an example of how to create SSH key files and add a public key to GitHub. Note, this requires coArchi 0.8.3 or later.

Create the files:

  1. In the Terminal app type ssh-keygen -t ed25519 -C "[email protected]"
  2. Enter a file name into which to save the key (the default is id_ed25519 but you might want a different one)
  3. Enter a pass-phrase when prompted

Add to GitHub:

  1. Assuming the file name you chose was id_ed25519, the public key file will be id_ed25519.pub. Copy the contents of the public key to the clipboard with clip < ~/.ssh/id_ed25519.pub(change the *.pub file name if you chose a different one.)
  2. At GitHub create a new key at https://github.com/settings/keys and paste the contents of the clipboard

For more information see the following:

https://help.github.com/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent/#platform-windows

https://help.github.com/articles/adding-a-new-ssh-key-to-your-github-account/

Setting the key file in Archi

In Archi's Preferences, select the "Collaboration" tab and, in the "SSH Authentication" section set the SSH key file (in the example above this is ~/.ssh/id_ed25519) and if the key file requires an identity password enter this too. Rather than selecting one identity key, coArchi 0.8.3 provides an option to scan the ~/.ssh file for SSH keys. This means you can have more than one SSH key for different remote hosts.

Using SSH in Archi

Once SSH has been configured, it's simply a case of using the appropriate URL when setting up a repository based model in the Collaboration Workspace. For example, when cloning a model or adding a model to the workspace, simply enter the URL of the online repository. Unlike HTTPS connections no user name or password is required as this is stored in the SSH key file.

Typical SSH URLs are like the following:

[email protected]:archimatetool/archi-modelrepository-plugin.git

[email protected]:User/project.git

ssh://[email protected]