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

Failed to clone nvm repo. Installation on Cygwin Bash #3119

Open
Lamera opened this issue May 30, 2023 · 7 comments
Open

Failed to clone nvm repo. Installation on Cygwin Bash #3119

Lamera opened this issue May 30, 2023 · 7 comments
Labels
installing nvm Problems installing nvm itself OS: windows

Comments

@Lamera
Copy link

Lamera commented May 30, 2023

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.

@ljharb
Copy link
Member

ljharb commented May 30, 2023

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 ljharb added OS: windows installing nvm Problems installing nvm itself labels May 30, 2023
@Lamera
Copy link
Author

Lamera commented May 31, 2023

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

@ljharb
Copy link
Member

ljharb commented May 31, 2023

aha, thanks. That's strange then. How is git installed?

@Lamera
Copy link
Author

Lamera commented Jun 1, 2023

winget install --id=Git.Git -e --accept-source-agreements --scope machine

@ljharb
Copy link
Member

ljharb commented Jun 1, 2023

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?

@bohdantrotsenko
Copy link

bohdantrotsenko commented Aug 24, 2024

My attempts to install nvm were also failing (albeit with a different error) as my git was installed by winget.

Installing git within cygwin (so that which git points to /usr/bin/git) solved the problem.

I suggest to close this issue with advise to install git to cygwin.

@ljharb
Copy link
Member

ljharb commented Aug 24, 2024

It’d be ideal if the install script could detect that scenario tho.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installing nvm Problems installing nvm itself OS: windows
Projects
None yet
Development

No branches or pull requests

3 participants