3

I have created a gitlab repository and followed the installation instruction by the letter and it was successful (i think... i can browse the repository online) and now I want to connect the egit plugin from eclipse to this remote repository.

I was using SVN for quite some time and now we need to switch to git and I am confused. egit only gives me the option to create a local repository but I'm a bit lost on how to push/fetch code to my online repository.

Any advice will be greatly appreciated :)

Thanks!

Wilo Maldonado
  • 551
  • 2
  • 11
  • 22

2 Answers2

2

With Gitlab (working with ssh urls), that means you have to register your public and private ssh key in Egit first before being able to clone it.

See EGit ssh configuration

EGit ssh config

Then you can clone it.

And yes, you need to clone the full repo locally to work on it, that is the difference between a:

  • CVCS (Centralized Version Control System) like SVN
  • DVCS: Distributed Version Control System.

See "Sell me Distributed revision control" and "Describe your workflow of using version control (VCS or DVCS)" for more.

Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
0

First you need to clone the remote repository using git clone <repository>, then you can import it to eclipse using egit

Or

You can use the clone functionality provided by EGit to clone the remote repo to local system

Arun P Johny
  • 384,651
  • 66
  • 527
  • 531
  • so you always have to clone your gitlab repository to a local one? Because when I was using SVN that was not the case. Only one repository was maintained... and that was the remote one – Wilo Maldonado Feb 28 '13 at 06:14
  • Yes, with git you never work directly on the remote repository, you always clone the repo locally make changes, commit changes and then push the changes back to the remote repo – Arun P Johny Feb 28 '13 at 06:24