nvm
nvm copied to clipboard
Failed to clone nvm repo. Installation on Cygwin Bash
Operating system and version: Windows 11 22H2 (Cygwin)
How did you install nvm?
Tried to install it in a cygwin bash shell.
What steps did you perform?
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
What happened?
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 15916 100 15916 0 0 244k 0 --:--:-- --:--:-- --:--:-- 246k
=> Downloading nvm from git to '/home/joel/.nvm'
=> Cloning into '/home/joel/.nvm'...
fatal: cannot copy 'C:/Program Files/Git/mingw64/share/git-core/templates/description' to 'C:/home/joel/.nvm/.git/description': Permission denied
Failed to clone nvm repo. Please report this!
What did you expect to happen?
That the correct windows filepaths are getting used on cygwin.
fatal: cannot copy 'C:/Program Files/Git/mingw64/share/git-core/templates/description' to 'C:/home/joel/.nvm/.git/description': Permission denied
indicates a permissions error. NVM_DIR by default installs in $HOME/.nvm, which is the location it's trying to install from.
@ljharb The problem is that C:/home/joel/.nvm/ doesn't exist. In cygwin the $HOME is pointing to /home/username. The C: is unnecessary and wrong here.
aha, thanks. That's strange then. How is git installed?
winget install --id=Git.Git -e --accept-source-agreements --scope machine
I'm not familiar with winget but is there any chance the issue is caused by that git installation, considering the C: first appears in git, and not in the path nvm's install script sends to git?