yarnpkg/yarn

Error downloading git repo over HTTP without a commit hash

Open

#2.117 geöffnet am 2. Dez. 2016

Auf GitHub ansehen
 (35 Kommentare) (34 Reaktionen) (0 zugewiesene Personen)JavaScript (2.731 Forks)batch import
cat-featurehelp wantedneeds-discussiontriaged

Repository-Metriken

Stars
 (41.514 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

Yarn version: 0.17.10

I want to report a bug.

Current behavior An attempt to install dependency from a git repo with specified branch, fails with message:

error Refusing to download the git repo http://<xxxxxxxxxxxx>.git over HTTP without a commit hash

Steps to reproduce: call yarn in project with package.json containing:

...
"devDependencies": {
    "name.of.the.dependency": "git+http://url.of.the.dependency/git.repo.name.git#develop"
  },
...

or call command: yarn add git+http://url.of.the.dependency/git.repo.name.git#develop

Expected behavior Dependency specified by git url should be installed. Branch specified after # should be used. Command: yarn upgrade git+http://url.of.the.dependency/git.repo.name.git#develop Should install dependency using latest commit from a specified branch (skipping yarn cache)

Additional info In yarn@0.16.* command yarn add worked as expected in specified scenario.

Contributor Guide