Can't clone nor stage git with lfs through egit - egit

Enviroment
I did setup an test enviroment for git-lfs. This includes Git 1.9.5, Eclipse 4.6.2 and EGit 4.4.0/4.6.0. git-lfs is installed and works. Eclipse shows the right git configuration parameters set by git lfs install (Preferences->Team->Git->Configuration->User Settings). Git-lfs is available in the PATH of git bash and the windows CMD.
Git and Git-LFS just works fine throught git bash.
Problem
It's important that it's possible to use git throught Eclipse Plugins, which is currently EGit. EGit usually seems to support git-lfs, but in my case I am not able to clone nor stage (cloned throught git bash).
Clone:Execution of filter command 'git-lfs smudge -- 'SW/xy.jar'' on file 'SW/xy.jar' failed with return code '2', message on stderr: 'Downloading 'SW/xy.jar' (289.10 KB)
Stage: Execution of filter command 'git-lfs clean -- 'SW/xy.jar'' on file 'SW/xy.jar' failed
Questions
Does someone have any suggestion what am I doing wrong?
Why is git-lfs clean executed throught adding/staging?
Thanks in advance! Any help will be appreciated!

Updating from GIT 1.9.5 to the current Version (2.11.1) helped!

Related

How to use git lfs with Visual Studio Team Services hosted build agents

I use git lfs to store the large files of my git repo. I then try to build this repo with hosted agents. My build is pretty simple. It has a single task: Execute PowerShell. In the invoked script, the first thing that I want to do is to fetch my lfs dependencies. I therefore have the following in my script:
& git lfs fetch
Unfortunately, my build fails with the following error:
2016-03-04T19:49:05.7021988Z ##[error]git: 'lfs' is not a git command. See 'git --help'.
2016-03-04T19:49:05.7031986Z ##[error]Did you mean this?
2016-03-04T19:49:05.7041987Z ##[error] flow
Since I can't install anything on hosted agents, how am I supposed to have git lfs available?
EDIT
In this issue, I am not talking about git lfs authentication problems as described here. I am strictly talking about the issue of calling git lfs.
Once you are able to call git lfs, look at this answer to solve the authentication problem.
Git LFS is now supported by default on the Hosted Build Controller. But you do need to enable it in your get sources step.
You get this error message because git-lfs isn't installed on Hosted Build Agent by default.
And since you are using Hosted Build Agent, it would be a little troublesome to install git-lfs via Chocolatey on it as you don't have administrator permission. An alternative way would be download the binary files for git-lfs directly and upload it into Source Control. Then you can invoke the git-tfs.exe with an absolute path in your script.
Here are some more details around the solution provided by Eddie. git lfs is not a built-in command. It is a git custom command.
When you call git lfs, git.exe does not know about the lfs command. So it looks in the PATH environment variable and searches for a program named git-lfs.exe. Once found, it calls that program with the provided argument.
So calling git-lfs.exe pull is equivalent to calling git.exe lfs pull.
The solution suggested is therefore to download git-lfs.exe, add it your git repo (it should obviously not be tracked by LFS), and call git-lfs.exe.
It is also possible to add the folder that contains git-lfs.exe to your path environment variable. This makes it possible to use commands like git.exe lfs pull as you usually do.
If you are allowed to install software and have internet access during build you might be able to install git-lfs using the Chocolatey package in a cmd / PowerShell task prior to your git-lfs operation.

installing the MOTODEV core plugins into eclipse "git command" s

I am going through the MOTODEV Core plugins installation here
I get to the step:
- "Use the git clone command to download the MOTODEV Core Plugins source repository into a working copy"
And this is where I get stuck. Where do I input this "git clone" command into Eclipse?
You could very easily do the clone from the command line as follows:
git clone https://android.googlesource.com/platform/tools/motodev.git
and then import the sources from the filesystem into eclipse -- it should pick up your project structure automatically.
Install "windows git" (http://msysgit.github.com/)
then type that git clone into a command line.
It keeps stopping between 43% and 61% for me though...damned aggravating because git clone doesn't have a continue command (I googled for a while for it and apparently it was a 2009 Google Summer of Code project but was never done)=:

Install: GitHub gamejs

I started today working with gamejs for a small project. I saw that most project are repository files on github dot com, so I downloaded the github for windows and the git bash.
Then I used git bash to clone gamejs repository. I proceed the same with some repository stuff. However, it seems that I forget to install something... because I cannot start the server, I have gjs-server.sh or .cmd missing. The bash doesnt recognize the command. What will I do?
Since you cloned the code instead of downloading the release tarball you need to build GameJS first:
Change into the GameJs directory
cd gamejs
Get all needed submodules with git:
git submodule init git submodule update
Compile RingoJs:
ant -f ./server/ringojs/build.xml jar
EDIT: Prior to building you need to install Apache Ant build tool. Since it is a Java application to install it just download the binary distribution from their download page and unzip it.

how to configure a git server to share projects

I currently have Fedora 17 inside a VM on my win7 computer. I want to configure the VM to manage my projects with git. I use eclipse helios on win7 with the egit plugin with my projects currently residing locally. Git and all the dependencies are already installed on the VM. The VM's hostname is dev.local and SSH is already installed, so I would use the following URL for access: ssh://john#dev.local:/php/projects/myframework.git
My question is, how do I initialize a new git repository on my VM and then push my local project up so that it's being managed by git in the VM?
OK, i finally figured it out. What I ended up doing was on my VM which is my Git server, was create my git directory:
# mkdir /home/brett/myproject.git && cd /home/brett/myproject.git
# git init --bare
On my client, in the project's folder (C:\www\myproject):
# git init
# git add .
# git commit -m "Initial commit"
# git remote add origin ssh://brett#dev.local/myproject.git
# git push origin master
I removed my client copy of the project and in eclipse, File > Import > Git > Project from Git, Select URI.
I plugged in the details to access the git repo on dev.local and was able to create a local copy in eclipse.
Anyways, thx everyone who took the time to reply to this. I actually found a decent article online which helped.
http://www.vogella.com/articles/EGit/article.html
run a git daemon in your vm. The git protocol would make it easier for you.

git push error "fatal: Unable to find remote helper for 'https'"

I've added remote origin like:
git remote add origin https://github.com/username/repo.git
When I push the git repository, I get this error:
git push -u origin master
fatal: Unable to find remote helper for 'https'
I am on git 1.7.1 on Ubuntu 10.04.4 LTS
Any ideas, greatly appreciated
If you compiled git from source, be sure to install this package first:
apt-get install libcurl4-openssl-dev
I just got the problem yesterday and solved it today, so am posting in case this might help a Windows user. For me, the problem occurred after I updated to the latest version of Git (because Visual Studio was recommending I do so-- something about things not matching.)
It turns out that I installed in the default directory Program Files, but my old Git was in Program Files (x86). (Hadn't noticed until tried reinstalling.)
Uninstalling the new version and installing the 64-bit Git for Windows Setup listed under Other Git for Windows downloads (which is not the default) overlaying the version in Program Files (x86) worked. (I tried other combinations of version and folders first.)
I did have to delete the local repository already created and restart with git init, git add ., git commit -m "first commit", git remote add origin theGitUrl (all of which worked before), before doing the git push origin master. The weird thing is that a pop-up window appeared to enter my user name and password. I didn't notice it at first and thought the processing on the git push was hung up. So, heads up about that "Other Git for Windows" version.
I did change my Environmental Variables before the fix; I don't know if that helped. I added these 2 to the PATH:
C:\Program Files (x86)\Git\bin
C:\Program Files (x86)\Git\libexec\git-core
I did this for both User and System variables.
A note on updating the PATH in Windows 10: you have to add one at a time and not include the ;
After much searching, the answer is you need git version 1.7.7
Can't update RVM - "fatal: Unable to find remote helper for 'http'"
I was working in a chroot jail and thought i had copied everything i needed for git to work but i was missing the git-core files themselves so i just had to copy them:
cp -r /usr/lib/git-core /opt/chroot/myjail/usr/lib/
Add this to git config: (Checked in centos 6.7 and working)
#git config --global url.https://.insteadOf git://
#To see the config added
#git config --list
url.https://.insteadof=git://
user.name=username
user.email=youremail
....