* Conflict between Eclipse JGit and Cygwin HOME @ 2020-03-17 0:23 David Karr 2020-03-17 1:03 ` Andrey Repin 0 siblings, 1 reply; 6+ messages in thread From: David Karr @ 2020-03-17 0:23 UTC (permalink / raw) To: The Cygwin Mailing List 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. The HOME variable is set by Cygwin, apparently. It is set to "/home/<myuid>". 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. 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. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Conflict between Eclipse JGit and Cygwin HOME 2020-03-17 0:23 Conflict between Eclipse JGit and Cygwin HOME David Karr @ 2020-03-17 1:03 ` Andrey Repin 2020-03-17 6:19 ` Brian Inglis 0 siblings, 1 reply; 6+ messages in thread From: Andrey Repin @ 2020-03-17 1:03 UTC (permalink / raw) To: David Karr, cygwin 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/<myuid>". 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... ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Conflict between Eclipse JGit and Cygwin HOME 2020-03-17 1:03 ` Andrey Repin @ 2020-03-17 6:19 ` Brian Inglis 2020-03-17 13:45 ` David Karr 0 siblings, 1 reply; 6+ messages in thread From: Brian Inglis @ 2020-03-17 6:19 UTC (permalink / raw) To: cygwin On 2020-03-16 19:03, Andrey Repin wrote: > 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/<myuid>". > > 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. You problem seems to be with your Windows network profile and Windows programs, nothing to do with Cygwin. Fixing the former will probably fix the latter. But if your work infrastructure does not yet support W10 1809 (do you really mean that release, not the current 1909 release?) you should not have upgraded, and any breakage is down to you. For Cygwin options see: https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch-desc -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Conflict between Eclipse JGit and Cygwin HOME 2020-03-17 6:19 ` Brian Inglis @ 2020-03-17 13:45 ` David Karr 2020-03-17 20:55 ` Brian Inglis 2020-03-17 20:55 ` Andrey Repin 0 siblings, 2 replies; 6+ messages in thread From: David Karr @ 2020-03-17 13:45 UTC (permalink / raw) To: The Cygwin Mailing List On Mon, Mar 16, 2020 at 11:20 PM Brian Inglis wrote: > On 2020-03-16 19:03, Andrey Repin wrote: > > 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/<myuid>". > > > > 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. > > You problem seems to be with your Windows network profile and Windows > programs, > nothing to do with Cygwin. > Fixing the former will probably fix the latter. > If it wasn't obvious, I'm trying to find a solution, not assign blame. Of course it has "something to do with Cygwin", because I'm using it, and Cygwin and WIndows are using a shared resource, the "HOME" variable. Cygwin and Windows try to use it for different purposes. There's nothing I can do about the "Windows network profile". > But if your work infrastructure does not yet support W10 1809 (do you > really > mean that release, not the current 1909 release?) you should not have > upgraded, > and any breakage is down to you. > Again, you took this as me trying to assign blame, which is pointless. Yes, I meant 1809, and although I performed the upgrade manually, it would have been done automatically in the near future if I hadn't, so there was no choice there. > For Cygwin options see: > > https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch-desc Yes, I've seen that, and considered my options there, but I don't think that will address this situation. The problem is the contents of the "HOME" variable. It doesn't matter where my Cygwin HOME directory actually resides. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Conflict between Eclipse JGit and Cygwin HOME 2020-03-17 13:45 ` David Karr @ 2020-03-17 20:55 ` Brian Inglis 2020-03-17 20:55 ` Andrey Repin 1 sibling, 0 replies; 6+ messages in thread From: Brian Inglis @ 2020-03-17 20:55 UTC (permalink / raw) To: cygwin On 2020-03-17 07:45, David Karr via Cygwin wrote: > On Mon, Mar 16, 2020 at 11:20 PM Brian Inglis wrote: >> On 2020-03-16 19:03, Andrey Repin wrote: >>>> 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/<myuid>". >>> >>> 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. >> >> Your problem seems to be with your Windows network profile and Windows >> programs, nothing to do with Cygwin. >> Fixing the former will probably fix the latter. > > If it wasn't obvious, I'm trying to find a solution, not assign blame. Of > course it has "something to do with Cygwin", because I'm using it, and Cygwin > and WIndows are using a shared resource, the "HOME" variable. Cygwin and > Windows try to use it for different purposes. There's nothing I can do about > the "Windows network profile". Andrey and myself are trying to point you towards solving your problem, which appears to be from your Windows network profile, which is set up by your Windows support team, and is broken under your upgraded release. You need to contact your corporate Windows support team and have them help to fix your profile problem. You can try to do so yourself by renaming your profile folder and immediately restarting your system. You will of course lose your settings, but this is a standard corporate Windows support approach, as is reimaging your system. To that end, restoring your system, by rolling back the upgrade, to its pre-upgrade state, would also be a viable approach for you to try. We are unconcerned about blame, only pointing at the likely cause, and your denial that anything can be done about your broken profile settings. >> But if your work infrastructure does not yet support W10 1809 (do you >> really mean that release, not the current 1909 release?) you should not >> have upgraded, and any breakage is down to you. > > Again, you took this as me trying to assign blame, which is pointless. > > Yes, I meant 1809, and although I performed the upgrade manually, it would > have been done automatically in the near future if I hadn't, so there was > no choice there. Your corporate upgrade would have been applied using a different approach, with relevant settings saved and restored, or replaced in a way compatible with your corporate environment. A lot of work and testing is done by corporate Windows support groups to minimize problems and their subsequent support load after upgrades. >> For Cygwin options see: >> >> https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch-desc > > Yes, I've seen that, and considered my options there, but I don't think > that will address this situation. The problem is the contents of the > "HOME" variable. It doesn't matter where my Cygwin HOME directory actually > resides. That section shows how to override HOME under Cygwin using an XML like SAM Comment: $ net user $USER /comment:"<cygwin home=\"/home/$USER\" />" which may need some extra quoting to get the quotes into the comment: you may then symlink your effective home directory to /home/$USER. The docs are available locally if you install cygwin-doc and use: $ cygstart /usr/share/doc/cygwin-doc/html/cygwin-ug-net/ntsec.html but cygstart does not support fragments in file URLs. -- Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada This email may be disturbing to some readers as it contains too much technical detail. Reader discretion is advised. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Conflict between Eclipse JGit and Cygwin HOME 2020-03-17 13:45 ` David Karr 2020-03-17 20:55 ` Brian Inglis @ 2020-03-17 20:55 ` Andrey Repin 1 sibling, 0 replies; 6+ messages in thread From: Andrey Repin @ 2020-03-17 20:55 UTC (permalink / raw) To: David Karr, cygwin Greetings, David Karr! >> >> You problem seems to be with your Windows network profile and Windows >> programs, >> nothing to do with Cygwin. >> Fixing the former will probably fix the latter. >> > If it wasn't obvious, I'm trying to find a solution, not assign blame. I, personally, offered at least one solution that I've tested myself. Cygwin Git do not play nice with naive programs over local filesystem. UNC paths are a lil' bit better in this regard. But Git-for-Windows will certainly work better with native tools. > Of course it has "something to do with Cygwin", because I'm using it, It should have something to do with the air, because you are breathing it… I hope you get the analogy. > and Cygwin and WIndows are using a shared resource, the "HOME" variable. No, Windows do NOT use %HOME% in any way, shape, or form. > Cygwin and Windows try to use it for different purposes. There's nothing I > can do about the "Windows network profile". Windows only using 1. %HOMEDRIVE%%HOMEPATH% 2. %HOMESHARE% 3. %USERPROFILE% as far as I recall. These are all different variables pointing to (potentially) different locations. Supposedly, all of them exist (if defined). (I may be wrong, but my 12 years of experience with domain networks tell me this should be true.) >> But if your work infrastructure does not yet support W10 1809 (do you >> really >> mean that release, not the current 1909 release?) you should not have >> upgraded, >> and any breakage is down to you. >> > Again, you took this as me trying to assign blame, which is pointless. Again, no. We made a mission statement, but at the same time we offered a solution. > Yes, I meant 1809, and although I performed the upgrade manually, it would > have been done automatically in the near future if I hadn't, so there was > no choice there. >> For Cygwin options see: >> >> https://cygwin.com/cygwin-ug-net/ntsec.html#ntsec-mapping-nsswitch-desc > Yes, I've seen that, and considered my options there, but I don't think > that will address this situation. The problem is the contents of the > "HOME" variable. It doesn't matter where my Cygwin HOME directory actually > resides. See above. And test your assumptions. -- With best regards, Andrey Repin Tuesday, March 17, 2020 23:47:29 Sorry for my terrible english... ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2020-03-17 21:05 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-03-17 0:23 Conflict between Eclipse JGit and Cygwin HOME David Karr 2020-03-17 1:03 ` Andrey Repin 2020-03-17 6:19 ` Brian Inglis 2020-03-17 13:45 ` David Karr 2020-03-17 20:55 ` Brian Inglis 2020-03-17 20:55 ` Andrey Repin
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).