[Bug] scoop status : error: cannot open '.git/FETCH_HEAD': Permission denied
Bug Report
Current Behavior
Hi, when I run scoop status, I get this :
PS C:\ProgramData\scoop\apps\scoop\current> scoop status | select -f 1
error: cannot open '.git/FETCH_HEAD': Permission denied
error: cannot open '.git/FETCH_HEAD': Permission denied
error: cannot open '.git/FETCH_HEAD': Permission denied
error: cannot open '.git/FETCH_HEAD': Permission denied
Scoop is up to date.
Name Installed Version Latest Version Missing Dependencies Info
---- ----------------- -------------- -------------------- ----
aws 2.18.2 2.24.14
PS C:\ProgramData\scoop\apps\scoop\current>
Expected Behavior
I expect no error messages.
Additional context/output
I might have installed scoop for all users but I can't remember how I did it.
I also had an error regarding the owner of C:/ProgramData/scoop/apps/scoop/current so I typed this command :
git config --global --add safe.directory C:/ProgramData/scoop/apps/scoop/current
I gave my current user full control ACL on the .git/ subdirectory but it does not seem to be enough.
Possible Solution
System details
Windows version: 10 OS architecture: 64bit
PowerShell version:
Major Minor Build Revision
----- ----- ----- --------
5 1 19041 4046
Additional software: git
Scoop Configuration
{
"root_path": "C:\\ProgramData\\scoop",
"last_update": "2023-03-03T17:33:59.5215466+01:00",
"aria2-retry-wait": "1",
"aria2-options": "--max-concurrent-downloads=10",
"aria2-min-split-size": "1M",
"aria2-max-connection-per-server": "20"
}
Did you manually move scoop's default installation location? From the README:
Run the following commands from a regular (non-admin) PowerShell terminal to install Scoop:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
Note: The first command makes your device allow running the installation and management scripts. This is necessary because Windows 10 client devices restrict execution of any PowerShell scripts by default.
It will install Scoop to its default location:
C:\Users\<YOUR USERNAME>\scoop
How did scoop end up in C:/ProgramData/scoop?
I would try deleting anything related to scoop and trying again from scratch. Follow the README.
@powercoconola
Did you manually move scoop's default installation location?
Nope, I did not move it.
How did scoop end up in
C:/ProgramData/scoop?
I wanted to install scoop globally so I typed this according to this doc :
iex "& {$(irm get.scoop.sh)} -RunAsAdmin -ScoopDir $env:ProgramData\scoop"
What happens if you run PS C:\ProgramData\scoop\apps\scoop\current> scoop status | select -f 1 with an Admin Powershell window?