Skip to content
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’ll 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
Merged

disable lookup for GitHub's version of Git #35965

merged 1 commit into from
Oct 10, 2017

Conversation

shiftkey
Copy link
Contributor

@shiftkey 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.

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
Copy link
Member

Makes sense, thanks @shiftkey!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants