Remote repository
A remote repository on repository hosting platforms such as GitLab, GitHub, and Bitbucket is a repository accessible over the internet to all users. These platforms provide a centralised place to store and manage projects based on the Git version control system.
Engee has its own remote repository hosted by GitLab at link. All users registered with Engee have access to the remote repository by default with their Engee account login/password. |
The interface examples are taken from GitLab. If you use a different hosting for version control, please refer to the official documentation of the respective hosting.
You can work with Git on the site of the corresponding hosting, but most often they are used as a repository for projects, and all work is done locally on the developer’s computer. To access a remote repository, you need to get a link to that repository. The link allows the local repository to communicate with the remote repository, synchronise and exchange changes between the local and remote repositories using Git. Read more about obtaining links below. |
Remote repository git.engee
Go to remote repository Engee with your Engee account login/password. If you have never used git.engee, you will be taken to the start menu to create your own project or join an existing one:
Consider creating your own project:
-
Select Create a project. This will open the project creation menu. One of three options will be offered:
-
Create blank project - create a blank project for file storage, work planning and code collaboration and/or other purposes.
-
Create from template - create a project pre-populated with the necessary files to get started quickly. There are a number of built-in templates for specific programming languages and shells to choose from.
-
Import project - transfer data from an external source, such as GitHub, Bitbucket, or another GitLab instance (hosting).
-
-
Create a blank project, specifying name, visibility (access to other users), configuration (creates README file) and slug if necessary:
The created project looks like this:
-
Now you can clone your own remote repository to work locally:
If you already have your own projects, they will be displayed on the home page:
Select the desired project and copy it as shown earlier.
The SSH key is generated automatically when you sign up for an Engee account. To work with other remote repositories (outside of GitLab Engee), you will have to create a key yourself. To work with a remote Engee repository, use the SSH link specifically.
Consider connecting to other people’s projects.
-
Select Explore public projects from the GitLab main menu if you haven’t created your own project yet:
or select Explore projects from the menu of created projects:
Both options will open the project search section:
-
Click on one of the tabs: All (all projects), Most starred (most popular) or use the filter by name (Filter by name). Then select the desired project marked Public
.
You can clone all repositories marked Public (for public usage). Repositories labelled Internal
(internal) are closed to other users by default. You can request access to such a repository using the Request Access command on the repository page.
-
On the selected project page, clone it using an SSH key. You can also clone the repository using HTTPS, but this will require a login/password each time you interact with the repository (unless they have been cached):
Working with remote repositories in Engee
To work with remote repositories in Engee, you need to add an SSH key yourself. Commands to add a key are entered into command line of Engee in shell mode.
To switch the command line to shell mode, use semicolon ; - the command line will change from engee> to shell> and will support all Git commands.
|
Add an SSH key using the following instructions (using GitLab hosting as an example):
-
Generate the key using the
ssh-keygen
command by entering it at the command prompt in shell mode:ssh-keygen -C "comment"
-
The command line will prompt you to save the generated key. You don’t have to change the directory where the key is saved. Then press Enter at all command line prompts until you get
randomart
- a visual representation of the SSH key:Receiving the image means that the key was successfully created. By default, the key will be saved in the
/home/engee/.ssh/id_rsa
directory. The .ssh folder will be hidden in the Engee file browser. -
Get the contents of the SSH key using the command:
cat /home/engee/.ssh/id_rsa.pub
-
Copy the contents of the SSH key and return to the hosting site. Click on the user avatar and select Edit profile from the context menu.
-
Open the SSH-keys section, paste the previously copied key into the designated field and click the Add key button:
-
Next, go to the page of the required project and clone its repository with the SSH key:
Enter the command to clone the repository:
git clone git@git.engee.com:имя пользователя/имя репозитория.git
-
For further work with the cloned repository, see the article Git in the Engee command line.
The key has a limited validity period, which can be extended in the SSH-keys section. Once you have the key, you can clone remote repositories from GitLab to work in Engee and locally on your computer. |
Modifying a configuration file via the nano editor in Engee
Changing the SSH configuration file (~/.ssh/config) simplifies the process of connecting to remote repositories, especially if you have multiple SSH keys for different hosts or repositories. You can use the built-in command line editor nano to change the SSH configuration. To do this:
-
Switch the command line to
shell
shell mode using semicolon ; - the command line will change fromengee>
toshell>
. -
Enter the command to open the SSH configuration file using the nano text editor:
nano ~/.ssh/config
-
In the editor window, specify the hosting address (in our case git.engee.com) and the path to the Engee generated key as shown in the example:
Host git.engee.com User git IdentityFile /home/engee/.ssh./id_rsa Host * StrictHostKeyChecking no
where
-
Host
- hosting address. -
User
- user name. -
IdentityFile
- path to the generated key (specified by default). -
StrictHostKeyChecking
- disable host key checking. Set tono
to automatically add new host keys without confirmation request.
-
-
Press Ctrl+X to save the changes (the bottom line will appear asking Save modified buffer?):
-
Press Y to save the changes and confirm saving to the directory with the key Enter. After saving, the nano editor will close automatically.
-
Now you can clone a remote repository into Engee in the usual ways using multiple keys and from different hosts.