xdrip-js / Logger

14 stars 30 forks source link

Install git vs https #231

Open Foxy7 opened 3 years ago

Foxy7 commented 3 years ago

Hi,

Regarding install url for logger and the issue i've had previously.

Is there any benefit in using git instead of https?

https://github.com/xdrip-js/Logger/blob/5912b7be7c842351c85002cccf5dd2e64b75822c/package.json#L17

My install fails, i believe, due to this one and only instance of "git" in the code hence why i had to find a work around previously and additional comment in the troubleshooting help.

Also i notice that Oref0 uses "https" for the repo location in the package.json, https://github.com/openaps/oref0/blob/acb0150021e7bf284b6741a9510076a13f690747/package.json#L11.

I propose that we change package.json line 17 to be

"url": "https://github.com/xdrip-js/Logger.git"

I'm happy to make the pull request just unsure why it's git// in the first place.

thanks,

scottleibrand commented 3 years ago

Yes, https should be fine for folks who are just downloading a read-only copy of the repo. Please test that changing it to https fixes your issue, and PR if so.

Foxy7 commented 3 years ago

@scottleibrand thanks, will test and let you know, then hopefully PR. Likely to be next week.

Foxy7 commented 3 years ago

@scottleibrand sadly this didn't work and appears to be a know issue with npm install due to firewall port blocking https://github.com/npm/npm/issues/6285#issuecomment-56640354.

The issue appears in line 10. https://github.com/xdrip-js/Logger/blob/900f63138cb742bf904c9c97cb79484d009f1d1c/package.json#L10

Observed point is immediately after upgrade-node.sh:

root@MealsDev3:~/src/Logger# sudo npm run global-install

> Logger@1.2.4 global-install /root/src/Logger
> rm -rf ./node-modules/xdrip-js && ./bin/upgrade-node.sh && npm install && ./bin/logger-setup.sh

Node version already at v8 - good to go
[  ................] \ fetchMetadata: sill resolveWithNewModule xdrip-js@2.1.5 c

So I tried adding git config --global url."https://".insteadOf git:// before npm install on L10 which also didn't work.

"global-install": "rm -rf ./node-modules/xdrip-js && ./bin/upgrade-node.sh && git config --global url."https://".insteadOf git:// && npm install && ./bin/logger-setup.sh"

Any ideas if i'm missing some single quotes?

The manual work around still works https://github.com/xdrip-js/Logger#install-issues.

Thanks.

scottleibrand commented 3 years ago

I'm not familiar with that url insteadOf thing.

Do we need to revert anything?

Foxy7 commented 3 years ago

I'm not familar with it either, just tried it and it worked..

Nothing to do at the moment. Will keep thinking about it as i look as some other bits. Thanks

saeed3232 commented 1 year ago

Cloning into 'xerosploit'... fatal: unable to access 'https://github.com/LionSec/xerosploit/': Could not resolve host: github.com حد يعرف السبب