I know people have gotten this error before and their problems have been solved in various ways but I think I have a new problem.
I get this message when running scoop update (just as it is, or with * or a specific package name, whatever). If I look in C:\Users\<username>\scoop\apps\scoop\current, I find a git repo, status is fine, seems no problem.
So there are a few things that could be at issue here. First, my %HOMEPATH% (~ in PowerShell) is not C:\Users\<username> but actually just D:\. I don't know why, it's my work PC and it's just set up that way. In fact, there is even a .scoop file in D:\ (but not a scoop folder, that's in my user directory along with another .scoop). Second, the version of Git being used is probably not the regular Windows Git but the one that comes with MSys2 instead (git version 2.20.1). So, yes, I'm also using MSys2 and, in that environment, my ~ is actually D:\Users\<username> for some reason. But that doesn't seem to have anything to do with this issue since I have the same problem whether I run scoop from there or powershell or cmd.
I don't think it's relevant but I'm also behind an authenticating proxy and use CNTLM to get through that. I'm sure it's no issue.
Is there any other information I can provide?
I have an update on this. I found that, in scoop-update.ps1, there are git commands like git_pull and git_log. If I change these to use a space instead of underscore (git pull, git log), they seem to work. The script still fails on line 100 when trying to get the update log for a bucket.
Your installation seems corrupted.
cd "$env:SCOOP\apps\scoop\current"
git reset --hard
git pull
scoop update # Should work as expected
or just delete .git folder from $env:SCOOP\apps\scoop\current and run scoop update
@Ash258 Nope. That didn't do it.
I also tried completely removing scoop and then reinstalling. After that, scoop update ran normally but, after installing a couple apps and adding the extras bucket, it was back to failing. Even after uninstalling the apps and removing the bucket, still failing.
Then i suspect, that git itself is corrupted. Try reinstalling it.
For real? I use git all the time without issue
So, I had 2 gits installed. One was through pacman by MSys2 and the other was git for windows installed by choco. Seems like every environment was finding the MSys2 one so the windows one was probably never used. Uninstalled both and installed through Scoop. Same issue.
What is error message you're talking about?
Try setting the environment variable %SCOOP% to D:\scoop (or C:\Users\<username>\scoop).
Oh! I think I got it. In git.ps1, the git_proxy_cmd configures a command to be executed using $env:COMSPEC (in other words, cmd). But cmd on this pc seems to be blocked from doing anything on C: so it always drops back to D:
I believe that's the root of the problem. Now...what's a solution? Put Scoop on D: and change $env:SCOOP to reflect that?
hmm. still no
Ah... is it because my version of powershell is like 3?
I too had the same issue.
here is what i did to fix it.
Go to <SCOOP_INSTALL_DIR>/buckets
remove everything in this directory
individually pull the repos using git pull command in this directory using
git pull https://github.com/ScoopInstaller/Main
git pull https://github.com/lukesampson/scoop-extras
everything should work fine after this.
@okonomiyaki3000 Did you ever figure this out? I ended up just replacing all the git_proxy_cmd in git.ps1 with just git since I couldn't figure out how to fix the $env:COMSPEC line so that it would work as is.