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

Trouble Installing NVM "Clone succeeded, but checkout failed." #2273

Closed
abdullahemad12 opened this issue Jul 30, 2020 · 10 comments
Closed

Trouble Installing NVM "Clone succeeded, but checkout failed." #2273

abdullahemad12 opened this issue Jul 30, 2020 · 10 comments

Comments

@abdullahemad12
Copy link

Operating system and version:

Windows 10

nvm debug output:

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 13527 100 13527 0 0 27382 0 --:--:-- --:--:-- --:--:-- 27382
=> Downloading nvm from git to '/c/Users/ronas/.nvm'
=> Cloning into 'C:/Users/ronas/.nvm'...
remote: Enumerating objects: 290, done.
remote: Counting objects: 100% (290/290), done.
remote: Compressing objects: 100% (257/257), done.
remote: Total 290 (delta 35), reused 97 (delta 20), pack-reused 0
Receiving objects: 100% (290/290), 163.27 KiB | 539.00 KiB/s, done.
Resolving deltas: 100% (35/35), done.
error: invalid path 'test/fast/Aliases/"nvm alias" should not accept aliases with slashes'
fatal: unable to checkout working tree
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'

Failed to clone nvm repo. Please report this!

I am trying to install nvm on windows 10 using

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

but I get this error above

nvm ls output:

I dont have it yet so I cant run this

How did you install nvm?

$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash

If you are having installation issues, or getting "N/A", what does curl -I --compressed -v https://nodejs.org/dist/ print out?

$curl -I --compressed -v https://nodejs.org/dist/
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Trying 104.20.22.46:443...
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to nodejs.org (104.20.22.46) port 443 (#0)

  • ALPN, offering h2
  • ALPN, offering http/1.1
  • successfully set certificate verify locations:
  • CAfile: C:/Program Files/Git/mingw64/ssl/certs/ca-bundle.crt
    CApath: none
    } [5 bytes data]
  • TLSv1.3 (OUT), TLS handshake, Client hello (1):
    } [512 bytes data]
  • TLSv1.3 (IN), TLS handshake, Server hello (2):
    { [122 bytes data]
  • TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
    { [19 bytes data]
  • TLSv1.3 (IN), TLS handshake, Certificate (11):
    { [4904 bytes data]
  • TLSv1.3 (IN), TLS handshake, CERT verify (15):
    { [520 bytes data]
  • TLSv1.3 (IN), TLS handshake, Finished (20):
    { [52 bytes data]
  • TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1):
    } [1 bytes data]
  • TLSv1.3 (OUT), TLS handshake, Finished (20):
    } [52 bytes data]
  • SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384
  • ALPN, server accepted to use h2
  • Server certificate:
  • subject: OU=Domain Control Validated; OU=PositiveSSL Wildcard; CN=*.nodejs.org
  • start date: Oct 21 00:00:00 2019 GMT
  • expire date: Jan 18 23:59:59 2022 GMT
  • subjectAltName: host "nodejs.org" matched cert's "nodejs.org"
  • issuer: C=GB; ST=Greater Manchester; L=Salford; O=Sectigo Limited; CN=Sectigo RSA Domain Validation Secure Server CA
  • SSL certificate verify ok.
  • Using HTTP2, server supports multi-use
  • Connection state changed (HTTP/2 confirmed)
  • Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
    } [5 bytes data]
  • Using Stream ID: 1 (easy handle 0x264e170)
    } [5 bytes data]

HEAD /dist/ HTTP/2
Host: nodejs.org
user-agent: curl/7.71.1
accept: /
accept-encoding: deflate, gzip, br

{ [5 bytes data]

  • TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
    { [230 bytes data]

  • TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
    { [230 bytes data]

  • old SSL session ID is stale, removing
    { [5 bytes data]

  • Connection state changed (MAX_CONCURRENT_STREAMS == 256)!
    } [5 bytes data]
    < HTTP/2 200
    < date: Thu, 30 Jul 2020 22:00:00 GMT
    < content-type: text/html
    < set-cookie: __cfduid=d667a7c6830bd0b0c4769edc81942bdb21596146400; expires=Sat, 29-Aug-20 22:00:00 GMT; path=/; domain=.nodejs.org; HttpOnly; SameSite=Lax
    < cache-control: max-age=14400
    < cf-cache-status: HIT
    < age: 4376
    < cf-request-id: 044356550b0000e5f405bec200000001
    < expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
    < vary: Accept-Encoding
    < server: cloudflare
    < cf-ray: 5bb2599b4d09e5f4-LHR
    < content-encoding: br
    <
    0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0HTTP/2 200
    date: Thu, 30 Jul 2020 22:00:00 GMT
    content-type: text/html
    set-cookie: __cfduid=d667a7c6830bd0b0c4769edc81942bdb21596146400; expires=Sat, 29-Aug-20 22:00:00 GMT; path=/; domain=.nodejs.org; HttpOnly; SameSite=Lax
    cache-control: max-age=14400
    cf-cache-status: HIT
    age: 4376
    cf-request-id: 044356550b0000e5f405bec200000001
    expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
    vary: Accept-Encoding
    server: cloudflare
    cf-ray: 5bb2599b4d09e5f4-LHR
    content-encoding: br

  • Connection #0 to host nodejs.org left intact

@ljharb
Copy link
Member

ljharb commented Jul 31, 2020

Are you using WSL for this, or git bash or Cygwin? Only WSL Is POSIX, and thus supported.

@12arpitgoel
Copy link

I am getting the same problem and outputs, and I am using git bash.

@ljharb
Copy link
Member

ljharb commented Jul 31, 2020

@12arpitgoel nvm doesn't support git bash. The only way to use it on windows is with WSL.

@ljharb
Copy link
Member

ljharb commented Aug 1, 2020

@akhilalekha to be clear, that's WSL, not git-bash?

@akhilalekha
Copy link

I tried this command inside git bash

@ljharb
Copy link
Member

ljharb commented Aug 2, 2020

@akhilalekha again, nvm does not support git bash - that won’t work, because git bash is not posix compliant. The only way to use nvm on windows is to use WSL.

@magreenblatt
Copy link

You state that nvm requires POSIX compliance, however the problem in this case appears to be file names that are invalid on Windows -- and that seems like something that would be easy to fix. See issue #1643, for example, where similar issues with file names were resolved.

Given that other issues, like #3162, suggest that nvm mostly works fine with Git Bash, it would be nice to resolve this issue and un-break the installation process for Git Bash.

@ljharb
Copy link
Member

ljharb commented Jan 8, 2024

@magreenblatt the files have already been renamed, afaict, can you confirm it's still an issue today?

@magreenblatt
Copy link

@ljharb thanks, I can confirm that it's fixed with v0.39.7 (instructions here). I initially tried v0.37.2 (from Nov 2020), which must be before the fix was landed.

@ljharb
Copy link
Member

ljharb commented Jan 8, 2024

Great news!

@ljharb ljharb closed this as completed Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants