yarnpkg/yarn

Error downloading git repo over HTTP without a commit hash

Open

#2 117 ouverte le 2 déc. 2016

Voir sur GitHub
 (35 commentaires) (34 réactions) (0 assignés)JavaScript (2 731 forks)batch import
cat-featurehelp wantedneeds-discussiontriaged

Métriques du dépôt

Stars
 (41 514 stars)
Métriques de merge PR
 (Aucune PR mergée en 30 j)

Description

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.

Guide contributeur