yarnpkg/yarn

Error downloading git repo over HTTP without a commit hash

Open

#2,117 opened on Dec 2, 2016

View on GitHub
 (35 comments) (34 reactions) (0 assignees)JavaScript (41,514 stars) (2,731 forks)batch import
cat-featurehelp wantedneeds-discussiontriaged

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.

Contributor guide

Error downloading git repo over HTTP without a commit hash · yarnpkg/yarn#2117 | Good First Issue