Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bug for #2117 - http url not working #2449

Merged
merged 3 commits into from
Jan 14, 2017
Merged

Fix bug for #2117 - http url not working #2449

merged 3 commits into from
Jan 14, 2017

Conversation

fc
Copy link
Contributor

@fc fc commented Jan 14, 2017

(whoops branch should've been issue-2117-http-url-not-working...)

Summary

  1. This PR will resolve issue Error downloading git repo over HTTP without a commit hash #2117.
  2. It will upgrade an HTTP URL to HTTPS and see if that works then fallback to using HTTP if it fails.
  3. It will test an HTTPS URL too and verify that the git repos exists
  4. Fix and rewrite the broken tests

Test plan

The cause of the bug was having a project dependency which itself depended on an HTTP repos.

{
  "name": "yarn-test",
  "version": "1.0.0",
  "main": "index.js",
  "license": "MIT",
  "dependencies": {
    "pm2": "^1.1.3"
  }
}

Running a yarn install on the above would trigger this error

error Refusing to download the git repo http://ikt.pm2.io/ikt.git over HTTP without a commit hash

HTTPS is not valid for that domain since they have an Invalid certificate chain (refer to #2117 for details).

@fc fc changed the title Issue 1492 http url not working Issue 2117 http url not working Jan 14, 2017
@fc fc changed the title Issue 2117 http url not working Fix bug for #2117 - http url not working Jan 14, 2017
@bestander bestander merged commit 8231aec into yarnpkg:master Jan 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants