Linking my own Git server with my Windows Eclipse IDE - linux

I'm trying since two days to set up a private Git and link it with my Eclipse IDE.
First of all, I have a Raspberry running Rasbian as a server. SSH is working with SSH keys.
I created a new user to store my Git projects on. Git is installed too.
My dev computer is running Windows 10 and Eclipse Neon.1 with the Git plugin installed on. I have MSysGit installed too.
And here I can't link anything to make it working well together.
First, I didn't find how can I tell to EGit to use a SSH key. So I wanted to use the Git GUi provided by MSysGit but I don't know how to link it with my server.
I'm not here to ask you to setting up for me or even tell me how to do it step by step, I'm just looking for a detailled tutorial or video which can helps me with it. Most of tutorial I rode use Linux as dev OS, or link Eclipse directly on GitHub so I didn't find a situation like mine.

First you need git setting done in eclipse that provide GUI for git commands.
Then to link local server, add you local git server URL to your project remote URL. and it should be able to pull & push commit to your server.
This tutorial should be enough for all you need.
http://www.vogella.com/tutorials/EclipseGit/article.html
http://monkeyhacks.com/post/raspberry-pi-as-private-git-server

Related

How to use git to do version control when I edit my code in Windows but build and run my code in Linux (using pycharm)

I have a question that I edit my code using PyCharm in Windows platform, and build and run my code in Linux machine, I want to know what is the correct way to do version control using git? My current approach is
using git in Windows
build and run code in Linux
checkout different branches in Windows and upload code to Linux(and not upload binary files such as .o files and .so files)
I'm not quite comfortable with this approach so I want to know the better ways. Thank you!
and upload code to Linux
If your Linux machine is accessible through SSH (and has Git installed), a better option would be to git push your code to your Linux machine, using a:
bare repository
a post-receive hook to checkout/restore your code where you want on said Linux server.
You can see an example here.

How to connect to git repository in a remote Linux machine using Visual Studio 2017?

I have a git repository installed in a remote Linux server, but would like to work on it and sync my changes to the git repository using Visual Studio Community Edition 2017.
Apologies if this is a repeat question; am new to this and have looked at the existing answers on SO but don't seem to have found a direct answer for this.
I have managed to use Team Explorer to connect directly to github, but would prefer to connect to the git repository on the Linux server instead.
Thank you.
Let's say you have a user on the linux machine, with a projects subfolder in your home directory, and under that you have a git project in a folder called myproject.
You should be able to run git clone username#server:projects/myproject at any remote terminal (including windows with git installed), assuming you have an ssh server enabled on the linux server above (you may have to install openssh-server first).

Connect local git repos on windows and raspberry pi

I have a windows machine and a raspberry pi, each with a git repo.
I was able to set it up so I can pull from the pi to windows with the following command:
git remote add pi#192.168.3.101:/home/pi/code/
This should be stable since the pi is set to a static local IP. I'd like help with an equivalent command to run on the pi so I can pull from the windows machine to the pi given that the windows machine is not set to a static ip (maybe using the machine name?). I'm still learning the ropes when it comes to windows/linux interaction and nothing I googled seemed to turn up what I was looking for.
I don't want to put the code up on github, so please don't suggest that.
And I want to be able to develop on either machine so that means neither repo can be setup as bare. I appreciate any help!
You could install an ssh server on the Windows machine, or a Git repository service.
But it's not a normal use of Git to have repositories pushing to each other. Don't do it.
The normal use is to designate one central location that all remote repositories push to and pull from.
That central location could be your raspberry pi.
However, the repository to push to should be a so-called bare repository.
I'm guessing that the location /home/pi/code is a working tree, not a bare repository. I suggest to create a bare repository on the raspberry pi, to be used by both the workspace on raspberry pi, and the workspace in windows. Here's one way to do it.
Create a bare repository in /home/pi/repos/code.git (or wherever you like) by cloning from /home/pi/code:
git clone --bare /home/pi/code /home/pi/repos/code.git
Add this bare repository as the remote in both the working tree on raspberry by and on windows using the git remote command.

Does Gitlab comes with a windows client?

Does gitlab has its own windows client or does it support any other compatible windows client ? if so, could you please help with the same.
Thnks in advance for any help.
I use msys2.org and it works like a charm with GitHub, GitLab and BitBucket.
When you run the msys2 console for the first time, issue:
pacman -Syu git
This will update the system and install a fresh copy of git.
pacman is a powerful package manager and you may discover more potentially interesting packages with:
pacman -Ss <search string>
Note that git is a standard for source control (like SVN). In so far as a service claims it is git based, it must work with a git client. However, companies hosting the git server usually offer other services too: release repositories, continuous integration/delivery, wiki pages etc. These are not part of the git standard and therefore might require additional client software.

Windows 8 + Git + Composer + SSH

So, I've been using ubuntu linux for a few months and loved it for my web dev. Everything simply works!
But I switched back to windows because linux sadly doesn't run 90% of my apps :(
So now I have a question, how do you work with git, composer and ssh on windows?
Should I setup a linux virtualbox or is it possible to be able to work comfortably without it?
"TortoiseGit" is a nice extension if you prefer some graphical support, and this needs "msysgit" to give the git commands on windows - which also brings you "git bash" if you prefer the command line. "msysgit" could be installed standalone.
SSH under Windows is always Putty. Grab the newest release 0.63, it has security fixes. To work easily with git then, you need to setup the whole public key authentication with "pageant" running in the background. Putty does a bad job configuring it to convenient levels, you have to manually add it to autostart. Or you could either use KeePass with the KeeAgent plugin to get the same (I prefer it a lot: All authentication stuff in one location).
Executing composer is a question of having installed PHP >= 5.3. If PHP is installed, you execute the alternative install command (without curl) and are nearly ready to go. Having PHP and the composer.phar in the path or add their location to the path eases things a lot.
Caveat: I have no experience with Windows 8 so far, things might be different there. My suggestions are supposed to work on Win 7 at least.
The biggest drawback of Windows is that there is no decent shell support I'd like. Having a virtual machine still is a good idea, but you need your development tools within Windows as well.

Resources