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

[Installer]: upgrade cloning with gitdl #5

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

4lxprime
Copy link

Replacing git clone command and a lot of stuff with it by a simple gitdl line which is way better in term of network performances because we aren't downloading the whole project, moving/renaming things and can be easier to add repititives options.

@michaeldakin
Copy link

I'm no "std lib only" Andy, but realistically the gitdl package is just going over a repo api, slaps it into a map, creates the dirs and uses http.Get to download each file, which is not a whole lot better or different to the current setup.

The biggest issue I have is that gitdl does not do any form of checksum validation to confirm the files are correct and match the git repo you are downloading from.

Issues off the top of my head:

  • are the files correct?
    • have they been tampered with
    • malformed download
    • MITM/Proxy tampering or redirected request and provided different file
  • do they match the version / branch / tag you are after

I'd love to see sha checksum validation added to the gitdl project though!

@4lxprime
Copy link
Author

I like the fact of using only std lib because it means that your code doesn't depend on other devs and cannot really be compromised by unknown dev but actually i think this could help getting better compatibility because the user doesn't need to have the git binary in the PATH or using default git client, moreover, he doesn't need to re-download the whole project each time.
In gitdl i've added the checksum based on github api hash and a size check aswell.
I think i'll add a few options like different http clients (fasthttp and maybe gnet) for more performances.

@4lxprime
Copy link
Author

If there's something i could add to gitdl or something to change in my implementation i'll be happy to work on it.

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