... | ... | @@ -26,31 +26,15 @@ and you should be shown a list with the parameters set above. |
|
|
|
|
|
**Creating an SSH key**
|
|
|
---------------------------
|
|
|
The default way for secure Git operation on OpenVT is the SSH protocol. Therefore, before you can start creating local clones of OpenVT repositories, you have to create your own SSH key and deposit it on the platform. It is possible to use most of the git functionalities also via SSL: if you would like to use this method, you can skip the following steps.
|
|
|
The default way for secure Git operation on OpenVT is the SSL protocol via https. This does not require depositing an SSH key. Only if you would like to use SSH (e.g. if you are using submodules), you need to deposit an SSH key on your profile. In this case, follow the instructions [here](https://virtual.openvt.eu/help/ssh/README#adding-an-ssh-key-to-your-gitlab-account); once you are done, test your setup with
|
|
|
|
|
|
Before generating and depositing an SSH key, make sure your git configuration is correct (see above). A key generated with a wrong configuration will not work.
|
|
|
|
|
|
Open a terminal (as Linux user) or open the Git Bash app (on Windows). Now, follow the instructions [here](https://virtual.openvt.eu/help/ssh/README#generating-a-new-ssh-key-pair). Use if possible ED25519 keys; in case that does not work, use RSA instead. During the creation, you will be asked to specify a passphrase: please, remember that phrase, it will be your access to secure Git actions later. Furthermore, it is preferable to use the default file name and path suggested by ssh-keygen instead of defining a custom path.
|
|
|
|
|
|
Now, you have to deposit your SSH key to your OpenVT profile. First, open the public key in a text editor, select everything and copy (alternatively, use a dedicated command, see [here](https://virtual.openvt.eu/help/ssh/README#adding-an-ssh-key-to-your-gitlab-account)). Then, click on your avatar
|
|
|
in the upper right corner and selecting **Settings**. From there on,
|
|
|
navigate to **SSH Keys** and paste your public key in the "Key" section.
|
|
|
If you created the key with a comment, this will appear under "Title".
|
|
|
If not, give your key an identifiable title like _Work Laptop_ or
|
|
|
_Home Workstation_, and click **Add key**. Your key should now be deposited on your OpenVT profile.
|
|
|
|
|
|
Your can test your SSH setup with
|
|
|
```bash
|
|
|
ssh -T git@virtual.openVT.eu
|
|
|
```
|
|
|
If everything is set up correctly, you will be prompted for your passphrase and get a welcome message if you type the correct passphrase.
|
|
|
|
|
|
**If your SSH key still does not work:** a common problem is that the SSH client cannot find the path to the SSH key. In that case, try to repeat the creation of the key pair and do not provide a file name, use the default one instead. Re-submit the Public key and test it again.
|
|
|
|
|
|
|
|
|
**Cloning an OpenVT repository with SSH/SSL**
|
|
|
**Cloning an OpenVT repository with https/SSH**
|
|
|
--------------------------------------------------------------------------
|
|
|
Now we need to create your first local clone of a Gitlab repository. First, pick a repository on the OpenVT platform that you would like to clone (as a test, you can use the manual_and_guidelines repository, or just start your own private project). Browse to the corresponding repository screen (e.g., [this one](https://virtual.openvt.eu/platform_manual_and_guidelines/manual_and_guidelines)), find the blue "clone" button and copy the link for SSH cloning (the link starts with git@virtual.openvt.eu).
|
|
|
Now we need to create your first local clone of a Gitlab repository. First, pick a repository on the OpenVT platform that you would like to clone (as a test, you can use the manual_and_guidelines repository, or just start your own private project). Browse to the corresponding repository screen (e.g., [this one](https://virtual.openvt.eu/platform_manual_and_guidelines/manual_and_guidelines)), find the blue "clone" button and copy the link for https cloning (the link starts with https://).
|
|
|
|
|
|
Open a terminal (on Linux) or the Git Bash app (on Windows) and browse to the directory where you would like to place the local clone. Type on the command line prompt:
|
|
|
|
... | ... | @@ -64,15 +48,17 @@ mkdir <name_of_new_directory> |
|
|
```
|
|
|
where you replace <name_of_new_directory> with the name of the directory to create, and again browse into to that directory using cd.
|
|
|
|
|
|
Now, the actual cloning can happen: If you would like to use SSH (recommended method), type
|
|
|
Now, the actual cloning can happen: If you would like to use https (recommended method), type
|
|
|
```bash
|
|
|
git clone <SSH_cloning_link>
|
|
|
git clone <https_cloning_link>
|
|
|
```
|
|
|
(replace <SSH_cloning_link> with the link that you have copied from the blue button on the repository web site). You should be prompted to enter the pass phrase of your SSH key which you have (hopefully) memorised earlier. If you prefer cloning via SSL, type instead
|
|
|
(replace <https_cloning_link> with the link that you have copied from the blue button on the repository web site). You will be prompted for your OpenVT username and password, if the project you are about to clone requires any access privileges.
|
|
|
|
|
|
If you prefer cloning via SSH, type instead
|
|
|
```bash
|
|
|
git clone <SSL_cloning_link>
|
|
|
git clone <SSH_cloning_link>
|
|
|
```
|
|
|
You will be prompted for your OpenVT username and password, if the project you are about to clone requires any access privileges.
|
|
|
You should be prompted to enter the pass phrase of your SSH key which you have (hopefully) memorised earlier.
|
|
|
|
|
|
If in either case the process was successful, the clone of the repository should appear in the current directory, which you can check by typing
|
|
|
```bash
|
... | ... | |