Bug 480410 - Remote git commit failed with no message
Summary: Remote git commit failed with no message
Status: NEW
Alias: None
Product: PTP
Classification: Tools
Component: RDT.sync (show other bugs)
Version: 9.0   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-22 07:40 EDT by Andy Schoenemann CLA
Modified: 2022-08-31 17:24 EDT (History)
10 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andy Schoenemann CLA 2015-10-22 07:40:26 EDT
I'm not able to sync a small test project. What I have done:

1. Downloaded eclipse-parallel-mars-1-win32-x86_64.zip
2. Created a new synchronized project on my Windows client
3. Created a new remote connection to a Linux SLES 11 server
4. Sync failed with log:

!ENTRY org.eclipse.ptp.rdt.sync.ui 4 4 2015-10-22 13:30:41.470
!MESSAGE Error
!STACK 1
org.eclipse.ptp.rdt.sync.core.exceptions.RemoteSyncException: org.eclipse.ptp.rdt.sync.core.exceptions.RemoteSyncException: Remote Git commit failed with message: 
	at org.eclipse.ptp.internal.rdt.sync.git.core.GitRepo.commitRemoteFiles(GitRepo.java:278)
	at org.eclipse.ptp.internal.rdt.sync.git.core.GitSyncService.doSyncRL(GitSyncService.java:699)
	at org.eclipse.ptp.internal.rdt.sync.git.core.GitSyncService.doSync(GitSyncService.java:639)
	at org.eclipse.ptp.internal.rdt.sync.git.core.GitSyncService.synchronize(GitSyncService.java:529)
	at org.eclipse.ptp.rdt.sync.core.SyncManager$SynchronizeJob.run(SyncManager.java:79)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.eclipse.ptp.rdt.sync.core.exceptions.RemoteSyncException: Remote Git commit failed with message: 
	at org.eclipse.ptp.internal.rdt.sync.git.core.GitRepo.commitRemoteFiles(GitRepo.java:269)
	... 5 more
!SUBENTRY 1 org.eclipse.ptp.rdt.sync.git.core 4 0 2015-10-22 13:30:41.470
!MESSAGE org.eclipse.ptp.rdt.sync.core.exceptions.RemoteSyncException: Remote Git commit failed with message: 
!STACK 1
org.eclipse.ptp.rdt.sync.core.exceptions.RemoteSyncException: Remote Git commit failed with message: 
	at org.eclipse.ptp.internal.rdt.sync.git.core.GitRepo.commitRemoteFiles(GitRepo.java:269)
	at org.eclipse.ptp.internal.rdt.sync.git.core.GitSyncService.doSyncRL(GitSyncService.java:699)
	at org.eclipse.ptp.internal.rdt.sync.git.core.GitSyncService.doSync(GitSyncService.java:639)
	at org.eclipse.ptp.internal.rdt.sync.git.core.GitSyncService.synchronize(GitSyncService.java:529)
	at org.eclipse.ptp.rdt.sync.core.SyncManager$SynchronizeJob.run(SyncManager.java:79)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!SUBENTRY 2 org.eclipse.ptp.rdt.sync.git.core 4 0 2015-10-22 13:30:41.470
!MESSAGE Remote Git commit failed with message: 

That's all!

But for all that, a folder on the remote was created containing a .ptp-sync folder.

Any ideas on how to debug that?

- git version on remote: 2.6.2
Comment 1 John Eblen CLA 2015-10-22 11:57:25 EDT
I tested that sync works with the most recent Git version, which you are using on the remote, and it does. Make sure you have adequate space left on the remote.

What project type did you create? What toolchains did you select? Did you connect to an existing remote directory or create a new directory?
Comment 2 Andy Schoenemann CLA 2015-10-23 02:05:40 EDT
There is enough space on both sides. It doesn't matter what kind of synchronized project I created (C++, Fortran, blank). I alway get this error.

Is there a git command, that I can run on the remote side to do this git commit? Maybe I could get more detailed error messages.
Comment 3 Andy Schoenemann CLA 2015-10-23 02:25:46 EDT
There is enough space on both sides. It doesn't matter what kind of synchronized project I created (C++, Fortran, blank). I always get this error.

Is there a git command, that I can run on the remote side to do this git commit? Maybe I could get more detailed error messages.

I use git 2.6.1 not 2.6.2 (mistake of mine).
Comment 4 Andy Schoenemann CLA 2015-10-23 02:36:10 EDT
Updated to git 2.6.2 - same error.
Comment 5 John Eblen CLA 2015-10-27 13:09:05 EDT
Here is the git command that causes the exception:

git --git-dir=.ptp-sync --work-tree=. ls-files -X .ptp-sync/info/exclude -o -m | git --git-dir=.ptp-sync --work-tree=. update-index --add --remove --stdin ; git --git-dir=.ptp-sync --work-tree=. commit -m "Eclipse Automatic Commit"

Note that this doesn't include the commands that change directory and set the environment before this executes.
Comment 6 Andy Schoenemann CLA 2015-10-28 11:27:48 EDT
My synchronizing is working now, but I don't know exactly why. That's why I added a new user to my test remote machine. Than I tried to use this fresh user for the remote connection. Here I get the same error message again - strange. Seems that there have to be set up something first on the remote user account?
Comment 7 Andy Schoenemann CLA 2015-10-29 07:56:48 EDT
I have new information on how to fix the sync for a new created sync project:

1) login to remote server with ssh (Putty)
2) touch <project_loc>/foo.txt 
3) Sync in Eclipse

Now the sync is working. I have no idea why this helps. But maybe someone else could use this information to find the origin of this problem.
Comment 8 John Eblen CLA 2015-10-29 11:33:42 EDT
In step 2, is "foo.txt" a new file or an existing file? Prior to step 2, is the remote project folder empty?
Comment 9 Andy Schoenemann CLA 2015-10-30 02:16:24 EDT
Yes, the remotes project directory is empty at first. It only contains the .ptp-sync directory. Than a created a new empty file foo.txt.
Comment 10 Jan Leupold CLA 2015-11-19 08:09:45 EST
I experienced the same exception, but only when connecting to one special host.

In my situation it helped to set the default locale to "C" on this host,
because the code tries to match the text output of the git command.
Maybe there is also some configuration option to set the execution environment
for the git command ...
Comment 11 Michael Uelschen CLA 2015-12-14 12:34:15 EST
I can confirm the bug, and also the workaround touching foo.txt at the remote machine. My local system is OpenSuSE 13.2 and the remote system is SLES 12.0. The locale @ remote machine is de_DE.UTF-8 (is this matters as indicated by comment #10).
Comment 12 Endre Gábriel CLA 2019-07-01 05:57:35 EDT
I have the same issue with Eclipse Neon (4.6.3) and with the appropriate ptp.
The WA works, but only once. That is, by the next synchronization it comes again, and I have to remove the created foo file or create an other one.
Comment 13 Greg Watson CLA 2019-07-01 09:10:51 EDT
Hi, Eclipse Neon is no longer supported. Can you try with the Eclipse IDE for Scientific Computing 2019-06? (https://www.eclipse.org/downloads/packages/release/2019-06/r/eclipse-ide-scientific-computing) Thanks!
Comment 14 Alexey Loukianov CLA 2019-10-12 20:36:47 EDT
Hit this bug on 2019-09. Trick with "touch foo.txt" was kind'a working in terms file had been synchronized from remote server to local but synchronization in other direction kept failing.

After reading other comments in this bug report I tried changing default locale for remote server from "ru_RU.utf-8" to "en_US.utf-8" and it had resolved the issue. As it is not always possible to change system-wide locale on remote servers (i.e. it is almost never possible for simple end-user) I had tried two other solutions, both worked:
1) add "export LANG=en_US.utf-8" to remote user's bash profile;
2) add "~/.local/bin" into the PATH in remote user provide and create a wrapper named "~/.local/bin/git" with bash shebang and a single line of code 'LANG=C git "$@"'.
Comment 15 Dawid Pakula CLA 2020-06-26 09:29:20 EDT
Same on 2020-06. I'm not able to do any sync.
Comment 16 Matthias Wolle CLA 2022-08-31 17:24:59 EDT
I'm experiencing the bug with eclipse
Version: 2022-03 (4.23.0)
Build id: 20220310-1457

The mentioned workaround, adding export LANG=C to the remote user's .bashrc 
worked