Gitlab and Eclipse che integration - Help
In this tutorial, we will give you for each specific case all commands you need for algorithm development.
1- Clone a public repository from Gitlab to Eclipse che:
If the repository is public, you don't need any access rights.
1- Navigate to the repository and copy the HTTPS url
Log in Eclipse che and create a new workspace if you don' have created one.
In the workspace :
2- Click on Workspace, then "Import project"
3- Select Git if not select by default
4- Paste the HTTPS url you copied on 1.
5- Click import
6- you will find your project in the hierarchy. If it is a new repo, in the terminal run the command "cd TheNameOfYourProject" and "initTemplate.sh". You will find folders and files in the new project imported.
2- Invite a user to have access to a private repository:
If a repository is private, you need you to add each user, you want them to access to the repository :
3- Clone a private repository from Gitlab to Eclipse che:
If the repository is private, you need to :
1- Ask the owner of the repository to give you the access rights to his repository first.
2- Once you have the correct access rights :
3- In the repository, copy the HTTPS url
4- In your workspace in Eclipse ch, using the terminal run the command: git clone https://gitlab.biomass-maap.com/url-of-the-code-you-want-to-clone.git
5- The terminal will ask you for username and password.
6- If the credentials entered are correct, you will clone locally the project and can start to work on it.
3- Link an existing project in Eclipse che with a new repository in Gitlab:
If you have an existing project in Eclipse che, and wants to link with a new repository in Gitlab, you need to :
- Create the repository in Gitlab and copy the HTTPS link
- In Eclipse che, with the terminal run the following commands:
1- cd /projects/TheNameOfYourAlgorithm/
2- git init (To initialise a git project)
3- git remote add origin https://gitlab.biomass-maap.com/url-of-the-code-you-want-to-clone.git
4- git config --global user.@your mail.com
git config --global user.name "Your name"
5- git add . (to add all files you have in your project)
6- git commit -m "My first commit but you can put the message you want"
7- git push --set-upstream origin master