From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from forward105o.mail.yandex.net (forward105o.mail.yandex.net [37.140.190.183]) by sourceware.org (Postfix) with ESMTPS id AD06738A1401 for ; Tue, 17 Mar 2020 01:05:03 +0000 (GMT) Received: from mxback1j.mail.yandex.net (mxback1j.mail.yandex.net [IPv6:2a02:6b8:0:1619::10a]) by forward105o.mail.yandex.net (Yandex) with ESMTP id 8083B4200836; Tue, 17 Mar 2020 04:05:01 +0300 (MSK) Received: from sas1-5ebd8269dbc4.qloud-c.yandex.net (sas1-5ebd8269dbc4.qloud-c.yandex.net [2a02:6b8:c14:3611:0:640:5ebd:8269]) by mxback1j.mail.yandex.net (mxback/Yandex) with ESMTP id Ub9dr1SOil-51tux4Du; Tue, 17 Mar 2020 04:05:01 +0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1584407101; bh=SgfMJCys2q9qh/uBWHrUgfcWrouRCanYxXjUSPPxEAo=; h=In-Reply-To:Subject:To:Reply-To:From:Message-ID:References:Date; b=F767KwC5RYdFwih3p/95vY0WwBvDTOK6VAWqxd4K6lS9bx5AedWluL23dJkERQfGQ ATc6UEo6SYInxW/qppCVHbN1gKkLkLlgOayB81qWqpKybkhsH/AeGawbVqPrMiJHrB mVDHV7BqWYuwCpgib8HDMHdlELXWXB3M15dpzmzo= Authentication-Results: mxback1j.mail.yandex.net; dkim=pass header.i=@yandex.ru Received: by sas1-5ebd8269dbc4.qloud-c.yandex.net (smtp/Yandex) with ESMTPSA id R1U5Hl4PQ6-50bOxZf3; Tue, 17 Mar 2020 04:05:00 +0300 (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client certificate not present) Received: from [192.168.1.10] (HELO daemon2.darkdragon.lan) by daemon2 (Office Mail Server 0.8.12 build 08053101) with SMTP; Tue, 17 Mar 2020 01:03:09 -0000 Date: Tue, 17 Mar 2020 04:03:08 +0300 From: Andrey Repin X-Mailer: The Bat! (v6.8.8) Home Reply-To: cygwin@cygwin.com X-Priority: 3 (Normal) Message-ID: <528226091.20200317040308@yandex.ru> To: David Karr , cygwin@cygwin.com Subject: Re: Conflict between Eclipse JGit and Cygwin HOME In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=1.7 required=5.0 tests=DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, KAM_THEBAT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-Level: * X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: cygwin@cygwin.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Cygwin mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Mar 2020 01:05:05 -0000 Greetings, David Karr! > I've been running Cygwin on my Windows 10 laptop for quite a while. I use > git in Eclipse and in the shell. > What I'm describing isn't really a bug with Cygwin, but it breaks because > of the interaction with Cygwin, and I'm trying to find out a reasonable way > to fix this. > Over the weekend, I upgraded Windows 10 from 1709 to 1809. Somehow after > that I have messed up how git is used in Eclipse. > The Eclipse JGit framework figures out where my git config is by checking > things in the following order: > - 1. %HOME% if set, > - 2. %HOMEDRIVE%\%HOMEPATH%, if %HOMEDRIVE% is set, > - 3. %HOMESHARE% if set, > - 4. Java system property "user.home". > The HOMEDRIVE, HOMEPATH, and HOMESHARE variables are set by my work > infrastructure, and I appear to have no control over them. The resulting > %HOMEDRIVE%\%HOMEPATH% doesn't even exist. It should, that's nonsense. File an issue with your infrastructure team. > The HOME variable is set by Cygwin, apparently. No, it only set HOME if it is not set yet, and even then only for login shells. > It is set to "/home/". What "myid" is supposed to mean? HOME is set to /home/$USER by default, but can be overridden with proper nsswitch configuration. > I'm guessing that JGit looks at that and can't do > anything with it, so it goes down the list and doesn't find anything > useful. I end up with bad git config values. Just install Git for Windows, but don't add it to %PATH% in any way, shape or form. Then configure Eclipse to use that git instead of Cygwin one. > The workaround I've figured out is a batch file that sets HOME to the > expected Windows HOME, and then executes its command-line parameters. I > changed the target property in the Eclipse shortcut to add the full path to > this batch file at the front of the command line, and then I have to find > the eclipse.exe file and get the desktop icon from it. I'll have to do > this every time I install a new Eclipse distribution. Start by solving the issue from its head. Fix your %HOMEDRIVE%/%HOMEPATH%/%HOMESHARE%, configure your nsswitch to point to an existing profile path. -- With best regards, Andrey Repin Tuesday, March 17, 2020 3:59:16 Sorry for my terrible english...