New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable lookup for GitHub's version of Git #35965

Merged
merged 1 commit into from Oct 10, 2017

Conversation

Projects
None yet
2 participants
@shiftkey
Contributor

shiftkey commented Oct 10, 2017

馃憢 GitHub Desktop team member dropping in. We had report from someone who was seeing our app launch every few minutes, trying to open a weird path: desktop/desktop#2962

Repro steps:

  • on Windows
  • have classic GitHub for Windows installed
  • install new GitHub Desktop
  • open a private Git repository in Code
  • force a pull to trigger retrieving credentials

Actual behaviour:

GitHub Desktop is launched, trying to open a folder that doesn't look like a folder:

Expected behaviour:

No launching UI

What's Happening

The classic Git Shell had system-level config value to make itself act as a credential helper:

[credential]
	helper = !github --credentials

This was fine because we put github.exe first on the PATH when you launched Git Shell and only then, but we never added ourselves to the user's PATH for historical reasons (not wanting to interfere with existing Git installations mostly). Time passed, things changed, and with the new Desktop people wanted us to bring back the github command line for doing things like adding repositories to the app.

This time around we didn't have a Git Shell in-the-box, so we appended the location of github.bat to PATH so that it'd be available in whatever shell you like.

Now we have different problems, because github.bat doesn't act as a credential helper, and the classic github.exe will call github.bat and never itself because your PATH is setup that way.

So I'd like to just 馃敟 this lookup code and encourage people to setup Git for Windows.

disable lookup for GitHub's version of Git
If the classic GitHub for Windows (creatively named github.exe) is installed alongside the new GitHub Desktop (which installs a github.bat file to PATH), we can get into the situation where Code can ask the GUI to authenticate for a private repository, which it doesn't understand.

@joaomoreno joaomoreno merged commit a4402df into Microsoft:master Oct 10, 2017

1 of 3 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
license/cla All CLA requirements met.
Details
@joaomoreno

This comment has been minimized.

Show comment
Hide comment
@joaomoreno

joaomoreno Oct 10, 2017

Member

Makes sense, thanks @shiftkey!

Member

joaomoreno commented Oct 10, 2017

Makes sense, thanks @shiftkey!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment