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:
- In the Terminal app type
ssh-keygen -t ed25519 -C "[email protected]"
- Enter a file name into which to save the key (the default is
id_ed25519
but you might want a different one) - Enter a pass-phrase when prompted
Add to GitHub:
- Assuming the file name you chose was
id_ed25519
, the public key file will beid_ed25519.pub
. Copy the contents of the public key to the clipboard withclip < ~/.ssh/id_ed25519.pub
(change the*.pub
file name if you chose a different one.) - 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/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]