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

Git not working after upgrade #37981

Closed
emilekberg opened this issue Nov 9, 2017 · 34 comments
Closed

Git not working after upgrade #37981

emilekberg opened this issue Nov 9, 2017 · 34 comments
Assignees
Labels
git GIT issues info-needed Issue requires more information from poster

Comments

@emilekberg
Copy link

  • VSCode Version: Code 1.18.0 (dcee220, 2017-11-08T21:22:49.932Z)
  • OS Version: Windows_NT x64 10.0.16299
  • Extensions:
Extension Author (truncated) Version
vscode-mocha Com 0.1.1
tslint eg2 1.0.16
csharp ms- 1.13.0
debugger-for-chrome msj 3.5.0
material-icon-theme PKi 2.2.4
shader sle 1.1.2
shader-toy ste 0.4.0
unity-tools Tob 0.1.9
unity-debug Uni 1.2.1
vscode-todo-highlight way 0.5.11

Steps to Reproduce:

  1. Start Latest VS Code
  2. Go to Source Control panel
  3. It states: "There are no active source control providers"

Reproduces without extensions: Yes

I tried the workspaces, the first thing i did. not sure if this has something to do with it? Anyhow VS Code does not recognize git as a source control system anymore. At first i thought it was because i was using workspaces with two git repos in them, but it seems not to be caused by that. Any repo does not work.

@vscodebot vscodebot bot added the new release label Nov 9, 2017
@vscodebot vscodebot bot added the git GIT issues label Nov 9, 2017
@marisvs
Copy link

marisvs commented Nov 9, 2017

I have exactly the same problem. Before the upgrade to 1.18 git integration was seamless. Now I get the message "There are no active source control providers"

@sean-mcmanus
Copy link
Contributor

sean-mcmanus commented Nov 9, 2017

Users reported this with the ms-cpptools extension too, and that reinstalling the extension fixed it, so reinstalling the csharp extension may fix this too, although the root cause is some VS Code bug.

@joaomoreno
Copy link
Member

joaomoreno commented Nov 10, 2017

@emilekberg @marisvs Can you shutdown Code and run it with code --disable-extensions? Does git work again?

@joaomoreno joaomoreno added the info-needed Issue requires more information from poster label Nov 10, 2017
@emilekberg
Copy link
Author

@joaomoreno the original ticket state, I tried it with this parameter since the ticket template asked me to.

@joaomoreno
Copy link
Member

Can you show me a screenshot?

What folder are you opening? Is it the root of the repository?

@marisvs
Copy link

marisvs commented Nov 10, 2017

code screenshot:
image
windows explorer screenshot:
image
I am working in the root of the repository as you can see from the second screen shot

I also checked to launch code with : "code --disable-extensions" but problem remains.

@joaomoreno
Copy link
Member

Can you run Git: Show Git Output? What's in there?

@marisvs
Copy link

marisvs commented Nov 10, 2017 via email

@joaomoreno
Copy link
Member

No, in VS Code, open the Command Palette (Ctrl Shift P) and run the Git: Show Git Output command. It will show you a log view for the git integration. What's in there?

@marisvs
Copy link

marisvs commented Nov 10, 2017 via email

@joaomoreno
Copy link
Member

Please attach the image on GitHub. It doesn't work if you send it via email.

@marisvs
Copy link

marisvs commented Nov 10, 2017

image

@joaomoreno
Copy link
Member

Can you reproduce with the standalone ZIP? https://go.microsoft.com/fwlink/?Linkid=850641

@marisvs
Copy link

marisvs commented Nov 10, 2017

After downloading, I extracted the files to a temp directory and executed code.exe.
I was a little surprised to see my latest opened files (so that info is stored centrally?).
The git problem is the same as before. Also git: show output gives the same error message.

@emilekberg
Copy link
Author

yes i get the same behaviour as @marisvs is describing, even with downloaded version.
Is vs code dependent on external git client now and was not before? because i have not installed any git in windows. but it worked before. Long shot maybe, but something might have changed?

I use my git cli through ubuntu bash terminal.

@j-cong
Copy link

j-cong commented Nov 11, 2017

I have same problem. This is the only error from my VS Code's integrated DevTools:

git is not working - vs code

I'm using "GitHub for Desktop" and its git-bash on Win 8.1

@parky128
Copy link

Same problem here, I have just installed the 64 bit version (1.18, also I am on windows 10) where I previously had the 32 bit one which I uninstalled as instructed prior to installing the 64 bit version.

I then see the There are no active source control providers text displayed in the Source Control pane in VS Code.

I also get the command 'git.showOutput' not found toast message at the top of VS Code when opening the Command Palette (Ctrl Shift P) and run the Git: Show Git Output command

This has never been an issue previously, I have just tried installing and using the 32 bit version again, but still the error remains

@emilekberg
Copy link
Author

emilekberg commented Nov 12, 2017

@parky128 @j-cong @marisvs do neither of you have git installed on your machine seperately also? Or is that just me?

Edit:
This must be the issue, upon downloading the portable git and setting "git.path" to it, vs code git implemention works fine.
As far as i can see, i see no dependency on git to use vscode here: https://code.visualstudio.com/docs/supporting/requirements ?
and it did work before this release.

@j-cong
Copy link

j-cong commented Nov 12, 2017

@emilekberg I don't have separately installed Git, only the one that comes with "GitHub for Desktop", which is Portable Git as I know. But VS Code's "source control/git" has worked under the same conditions before 1.18.0 release.
"git.path" in my settings was set to null. I can confirm that after setting it manually, it started working

@emilekberg
Copy link
Author

@j-cong exactly same scenario as me... There must be some issue with built in github in this version then... :) Let's see when the crew gets back at it.

@joaomoreno
Copy link
Member

joaomoreno commented Nov 13, 2017

Code doesn't work with git which comes with Github for Windows, unfortunately.

Can you install Git from https://git-scm.com/ and see whether that solves the problem?

If that doesn't, can you set git.path to point to git.exe? Where is your git.exe?

@emilekberg
Copy link
Author

emilekberg commented Nov 13, 2017

@joaomoreno your suggested task should solve the problem, as it worked with the external one, however, my setup has worked in EVERY version of vscode except for the latest one, so something must have changed?

Edit: Installed a previous version again, and using Git: Show Git Output it actually was using the github one:

Using git 2.11.0.windows.3 from C:\Users\MY_USERNAME\AppData\Local\GitHub\PortableGit_f02737a78695063deace08e96d5042710d3e32db\cmd\git.exe
git rev-parse --show-toplevel
git config --get commit.template

however, the new version does not seem to identify this one (automatically at least)

@marisvs
Copy link

marisvs commented Nov 13, 2017 via email

@joaomoreno
Copy link
Member

joaomoreno commented Nov 13, 2017

@emilekberg @marisvs I assume both you guys are in Insiders? This is what changed: we no longer try to execute git, as if it's on the PATH. This is due to #32739 and many others, where such a spawn would simply crash the extension host. But this change is still only in Insiders...

One thing we can do for you guys is to try to find git in C:\Users\MY_USERNAME\AppData\Local\GitHub\PortableGit_RANDOMID...

@vbarinov
Copy link

vbarinov commented Nov 14, 2017

@joaomoreno My git executable wasnt in the system PATH (to be precise it was, but the old one). The problem is, before v. 1.18 VSCode somehow knew how to reach git (in C:\Users\%username%\AppData\Local\GitHub\PortableGit_%rid%\cmd) and now it doesnt. I should mention a reinstall of GitHub git a while ago, so the path probably changed.

Resolved the issue by putting current git path to the system PATH variable.

1.18.0 x64 Stable, Windows_NT x64 10.0.16299

@robdonn
Copy link

robdonn commented Nov 14, 2017

Just a note for some that may also have this problem - My git.exe was located at the following path:

C:\\Users\\%username%\\AppData\\Local\\Programs\\Git\\bin\\git.exe

Adding that to git.path in my settings fixed everything.

@emilekberg
Copy link
Author

So i guess a better error message would be needed? since "There are no active source control providers" does not really describe that you might need to install git.

Also another question i have, i'm trying to keep my windows as clean as possible and put most of my dev applications in Bash. Most works fine, but this seems like a hickup. I guess i'd need to use a window installation as of now?

@joaomoreno
Copy link
Member

joaomoreno commented Nov 15, 2017

#38244 (comment)

Please use git.path to configure where git is located.

I will push it further an bring a message in front of the user if we can't find git and detect this is a git repo: #38393

And one more step to try to detect GH4W's git.exe: #38394


@vbarinov I don't understand how you have this issue, since this change isn't in yet for stable... only for insiders... Are you sure nothing else changed in your system? This really should only happen for Insiders...

@marisvs
Copy link

marisvs commented Nov 15, 2017 via email

@joaomoreno
Copy link
Member

@marisvs If you open a Windows Command Prompt, does git --version return a proper version? Is git.exe in your PATH?

@marisvs
Copy link

marisvs commented Nov 15, 2017 via email

@joaomoreno
Copy link
Member

Oh!!!

#35965

Completely forgot about this. This change explains it. I'll do a better job at reporting this situation to the user in #38394

Thanks for all the info guys, sorry for my bad memory.

@Hotell
Copy link

Hotell commented Dec 6, 2017

still doesn't work on OSX High Sierra
code: Version 1.18.1 (1.18.1)
git: 2.15.1

works only when I run Code via code --disable-extensions :-/

@DavidRayner
Copy link

DavidRayner commented Dec 15, 2017

I'm seeing this after upgrading to v1.19.

  • VSCode Version: Code 1.19.0 (816be67, 2017-12-14T12:06:44.860Z)
  • OS Version: Windows_NT ia32 6.1.7601
  • Extensions:
Extension Author (truncated) Version
spellright ban 2.0.14
perl-syntax jac 0.0.4
python ms- 0.9.0
vscode-docker Pet 0.0.22
(1 theme extensions excluded)

Still not working when trying to use either of these git.path values:

"git.path": "C:\\Users\\%username%\\AppData\\Local\\Programs\\Git\\cmd\\git.exe"
"git.path": "%LOCALAPPDATA%\\Programs\\Git\\cmd\\git.exe"

Output of Git Output pane on startup:

Looking for git in: C:\Users\%username%\AppData\Local\Programs\Git\cmd\git.exe
Looking for git in: C:\Program Files\Git\cmd\git.exe
Looking for git in: C:\Program Files (x86)\Git\cmd\git.exe
Looking for git in: C:\Program Files (x86)\Git\cmd\git.exe
Git installation not found.

Output of where git in intergrated terminal after startup:

> where git
C:\Users\dr4\AppData\Local\Programs\Git\cmd\git.exe

Possibly related to #40229

@vscodebot vscodebot bot locked and limited conversation to collaborators Dec 30, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
git GIT issues info-needed Issue requires more information from poster
Projects
None yet
Development

No branches or pull requests

10 participants