Skip to content

Failed to install with git v1.6.2/1.5.5 #1232

@PeterDaveHello

Description

@PeterDaveHello
$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.32.0/install.sh | bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 10007  100 10007    0     0   223k      0 --:--:-- --:--:-- --:--:--  227k
=> Downloading nvm from git to '/home/peter/.nvm'
=> Initialized empty Git repository in /home/peter/.nvm/.git/
fatal: https://github.com/creationix/nvm.git/info/refs download error - The requested URL returned error: 403 Forbidden
Failed to clone nvm repo. Please report this!

Actually this problem also exist on the older git versions like v1.5.5, here are the cloning error message of v1.6.2 and v1.5.5:

$ git --version
git version 1.6.2.GIT
$ git clone https://github.com/creationix/nvm.git
Initialized empty Git repository in /run/shm/nvm/.git/
fatal: https://github.com/creationix/nvm.git/info/refs download error - The requested URL returned error: 403 Forbidden
$ git --version
git version 1.5.5.GIT
$ git clone https://github.com/creationix/nvm.git
Initialized empty Git repository in /run/shm/nvm/.git/
Cannot get remote repository information.
Perhaps git-update-server-info needs to be run there?

I found two workaround methods here.

  1. Use git protocol instead of https.
    Use git protocol will work properly, and even faster, however, there may be some firewall issues, it may not be so portable as network/system admin may let http/https go through the firewall by default, but may not do the same thing to git protocol which is using port 9418.
  2. Increase the minimum version require of git.
    I tried multiple git major versions after v1.6.2 like v1.7, v1.8, v1.9, v2.0, v2.1, v2.2, v2.3, there is no any problem of cloning the repo, however, I'll suggest to just ask for v1.7.10 in the document as the minimum git version instead of just v1.7.0, or at least v1.7.9.5 if you prefer to bump the version requirement, because v1.7.9.5 is the version Ubuntu 12.04 LTS using and v1.7.10 is the GitHub's suggestion as you can see here:
    https://help.github.com/articles/https-cloning-errors/#check-your-git-version
    The same cloning problem also been addressed in the article above.

Personally I prefer the second solution because you didn't really know this problem before(as v1.5.5 is the version been required in readme), since no body reports this before, and it's just because v1.5.5 is too old, even Ubuntu 12.04 LTS uses git v1.7.9.5.

I'll like to send a PR to fix this problem no matter which method you prefered, please let me know if you have any suggestion, thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    installing nvmProblems installing nvm itself

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions