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

Cloning from sourcehut (and non-git) #9

Open
VorpalBlade opened this issue Apr 1, 2024 · 5 comments
Open

Cloning from sourcehut (and non-git) #9

VorpalBlade opened this issue Apr 1, 2024 · 5 comments

Comments

@VorpalBlade
Copy link

Cloning https://sr.ht/~icefox/oorandom/
Couldn't clone https://sr.ht/~icefox/oorandom/ repo status=exit status: 128

Well:

$ git clone 'https://sr.ht/~icefox/oorandom/'
Cloning into 'oorandom'...
fatal: remote error: 

You have tried to clone a project from sourcehut, but you probably meant to
clone a specific git repository for this project instead. A single project on
sourcehut often has more than one git repository.



To browse all of the available repositories for this project, visit this URL:

  https://sr.ht/~icefox/oorandom/sources

Digging further into this apparently the correct download link is https://hg.sr.ht/~icefox/oorandom (using hg!). This seems like such a rare edge case that I don't know if you want to bother with it.

  1. Suspect repo link to begin with
  2. Not git, and how are you supposed to even know that?

Thought I open a case for awareness still. Feel free to close if it is out of scope.

@paolobarbolini
Copy link
Member

Well I'll start from the fact I don't even know how that stuff works. Does it have tags or some way of finding the code from a release? 😅

@VorpalBlade
Copy link
Author

So, hg (that is the command line program name, the full name is Mercurial) is another version control system, just like git, Subversion and many others. For the most part git won. Mercurial is distributed (just like git, unlike subversion).

We used to use mercurial at work (about a decade ago) before switching to git. I'm trying to remember how to use it. I believe it does have tags and branches (though branches are more than just the automatically moving tags they are in git). Unfortunately it seems this particular project did not use tags, so it wouldn't have helped anyway.

@link2xt
Copy link
Contributor

link2xt commented Apr 2, 2024

This should be reported to oorandom maintainers so they fix the repository URL to https://hg.sr.ht/~icefox/oorandom
https://sr.ht/~icefox/oorandom/ should go into homepage, not repository.
I submitted similar fix to RustCrypto/formats#1373, but cargo-goggles (this project) has a workaround for the RustCrypto case.

@link2xt
Copy link
Contributor

link2xt commented Apr 2, 2024

As for hg support, this bug should be upstreamed to cargo because it does not support hg in .cargo_vcs_info.json and we don't know the commit which should be checked out for the crate.

@paolobarbolini
Copy link
Member

I submitted similar fix to RustCrypto/formats#1373, but cargo-goggles (this project) has a workaround for the RustCrypto case.

I like this idea. We could as part of #11 make a list of crates that need their repo links adjusted. I think the workaround will have to stay in place for a while. Fortunately there doesn't seem to be a way of exploiting it as a vulnerability.

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

3 participants