Pm2: http://ikt.pm2.io is HTTP but HTTPS is preferred by yarn

Created on 14 Jan 2017  路  7Comments  路  Source: Unitech/pm2

Expected behaviour

yarn prefers HTTPS over HTTP when fetching repos.

https://ikt.pm2.io/ikt.git should work

Actual behaviour

https://ikt.pm2.io does not load the git repos for yarn (0.18.1) -- although I submitted a PR with yarn to fix this (https://github.com/yarnpkg/yarn/pull/2449). Still, HTTPS should work since HTTPS is checked and given priority over HTTP by yarn.

There are a few others who ran into this problem who are running an older version of pm2:
https://github.com/yarnpkg/yarn/issues/2117

It does not appear to be an issue with the latest version of pm2.

Steps to reproduce

In version 0.18.1 of yarn do a yarn install of this:

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

Software versions used

PM2        : 1.1.3
Question

Most helpful comment

Its working for me, can you confirm @fc ?

All 7 comments

Sadly we already have this issue reported in https://github.com/Unitech/pm2/issues/2599, but we can't repush version of pm2 v1.x.x to change the url so i guess we never be able to fix the problem.
The only solution is yarn to try to download the package in https even if the link is in http.

EDIT : just read the whole issue over yarn, i will get a ssl certificate working soon.

@fc Is the problem coming from the fact that the ssl certificate is invalid (that it will be working if we just redirect the client in http and it would be working) or yarn wait for a valid ssl certificate ?

The perfect fix is to get SSL working correctly on your end. You can try doing a redirect but somehow I don't think that'd work but hey worth a try.

I'll try to just make a redirect in the first place, if still not working i will look to get a letsencrypt certificate for the domain.

Its working for me, can you confirm @fc ?

Confirmed, works.

Perfect ! Thanks for taking time to investigate the issue :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rajendar38 picture rajendar38  路  3Comments

ghost picture ghost  路  3Comments

webchaz picture webchaz  路  3Comments

jubairsaidi picture jubairsaidi  路  3Comments

lefam picture lefam  路  3Comments