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

generate archive urls: tarball, zip, ... #160

Open
milahu opened this issue Aug 13, 2023 · 0 comments
Open

generate archive urls: tarball, zip, ... #160

milahu opened this issue Aug 13, 2023 · 0 comments

Comments

@milahu
Copy link

milahu commented Aug 13, 2023

expected result

> const GitUrlParse = require("git-url-parse");

> GitUrlParse("IonicaBizau/node-git-url-parse").getArchiveUrls()
{
  'tar.gz': 'https://github.com/IonicaBizau/git-url-parse/archive/refs/heads/master.tar.gz',
  'zip': 'https://github.com/IonicaBizau/git-url-parse/archive/refs/heads/master.zip'
}

challenge: different git webinterfaces have different archive urls

why: package managers prefer fetching archives, because its faster than git clone
(but less secure, because the commit object is missing, so the commit hash cant be verified...)

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

No branches or pull requests

1 participant