I'm new to Jenkins and experimenting at the moment. I use Eclipse and run Git from within Eclipse, using the Git plugin, which is described as follows: 'Eclipse Git is an Eclipse Team provider based on JGit, a pure Java implementation of the Git version control system'.
I've installed the Git plugin for Jenkins but when I go to configure it, Jenkins complains that it can't find the Git executable. That makes sense, and the obvious solution is to install it (in my case, using a Ubuntu repository - sudo apt-get install git-core). My concern is that having two installations of Git on the machine will give rise to problems - or am I being over-cautious?
It's fine to have both - since EGit is pure Java, it has nothing to do with the installed (native code) version of Git.
Problems might arise if there was a breaking change in a future version of Git, but it should be easy enough to fix by updating both installations.
Related
Are there any Eclipse plugin allowing a full remote development (including using git installed on the remote machine) as the "Remote Development" extension does for VS Code ?
Git is implicitly designed to work with remote git repositories, but it still does require a local git repository and git toolset. You can use the "eGit" plugin set already installed in Eclipse to "clone" from remote git repositories to your desktop. You don't need additional plugins for this.
The Git Source Code Mirror on GitHub (https://github.com/git/git) says that the most recent version of Git is 2.7.4. I'm using EGit 3.5.2 on Spring Tool Suite (Eclipse Luna SR1), so that version number obviously doesn't correspond to a Git version. Is there any way to trace back what version of Git this version of EGit is based off of?
I checked here, but it only maps versions of EGit to versions of Eclipse...
https://wiki.eclipse.org/EGit/FAQ#What_is_Git.3F
As you noticed, EGit does not appear to be based on a particular version of Git. The EGit documentation has the following to say:
How compatible is EGit with Git?
Some, but not all configuration options/features in Git are available in EGit/JGit. Here is a summary, not yet complete describing some of these, including notable differences. Note that the set of EGit/JGit is not based off a particular Git version.
Practically speaking, as long as you are using the most recent version of Git, you should be OK. This is because Git itself should be backwards-compatible with whatever version of Git was concurrent with the particular release of EGit which you are using. But I would not recommend the other way around, e.g. using the first release of Git from many years ago with the latest EGit plugin.
There is no correlation between EGit and Git versions. EGit uses JGit, a pure Java implementation of the Git VCS, to access repositories. JGit versions do not follow a specific Git versions either. Though JGit is relatively on par with Git, some things are missing, for example git clone -- depth. Unfortunately, a detailed comparison does not exist
I get the error below when I try to push:
"An internal Exception occurred during push: URI not supported:
sso:..."
SourceTree and IntelliJ allow to set git's executable path but not Eclipse which is always /usr/bin/git.
Note:
My git path is /usr/local/git/current/bin/git.
I can't symlink it to /usr/bin/git due to SIP, and I'm not allowed to disable it.
I can't change the URL, it must stay sso://.
I set /usr/local/git/current/bin/git first thing in $PATH, but Eclipse ignores it.
Versions:
/usr/local/git/current/bin/git - 2.7.0
/usr/bin/git - git version 2.5.4 (Apple Git-61)
Eclipse - 4.5.2
Eclipse EGit- 4.2.0.201601211800-r
The only solution I thought about is to set the path through:
Eclipse > Team > Git > Configuration, but I don't know what is the key, if there is any.
Eclipse uses EGit exclusively for git operations, which in turn uses JGit which is a port of native git to Java running inside Eclipse itself.
In other words, Eclipse does not rely on any native git on the system.
I would suggest raising an issue with the JGit project for the sso protocol, and use git push manually from the command line for the time being. You should be able to use Eclipse for all other git operations (not involving talking to origin).
See Using native git not jgit in Eclipse git? for more detail.
I have been working with Git from the command-line for a few weeks. I am now on a project that uses Eclipse as the IDE and EGit for the Git plugin. I am worried that by installing EGit I'm going to destroy any Git configs in my existing projects (that I've been maintaining/coding directly from a terminal).
If EGit could interfere, how so (and how can I avoid this)? If not, why?
No, it doesnt interfere. EGit only works within Eclipse and is independent from a command line Git installation. Regarding the configuration EGit of course reads your existing gitconfig. But if you use a recent Git version on the command line, there shouldn't be any differences in the config.
In fact you can keep using Git on the command line for committing, pushing etc. It doesn't matter if the project is configured for EGit in Eclipse.
I am playing with my eclipse cvs functionality (on my windows box), is there a way to check out a project hosted on github?
Anyone shows me a pointer? Thanks,
Not with the CVS client. You need to install git for Windows or a git plugin for Eclipse.
CVS and git are two different source code version control systems. Other popular choices are Subversion or Mercurial. You have to use different clients or Eclipse plugins for each of them.
Use EGit, which provides Git support as part of Eclipse and is available in both the latest Helios builds as well as the upcoming Indigo release.