yarnpkg/yarn

Error downloading git repo over HTTP without a commit hash

Open

#2,117 创建于 2016年12月2日

在 GitHub 查看
 (35 评论) (34 反应) (0 负责人)JavaScript (41,514 star) (2,731 fork)batch import
cat-featurehelp wantedneeds-discussiontriaged

描述

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.

贡献者指南