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

Fetch via git:// does not work #130

Closed
tfc opened this issue Oct 1, 2019 · 2 comments
Closed

Fetch via git:// does not work #130

tfc opened this issue Oct 1, 2019 · 2 comments

Comments

@tfc
Copy link
Contributor

tfc commented Oct 1, 2019

Hi there,

i am getting the following error:

$ niv add ipxe -t git://git.ipxe.org/ipxe.git
Adding package ipxe
Reading sources file
Could not read the output of 'nix-prefetch-url'. This is a bug. Please create a
ticket:

https://github.com/nmattia/niv/issues/new

Thanks! I'll buy you a beer.
stdout:

stderr:
warning: unable to download 'git://git.ipxe.org/ipxe.git': Unsupported protocol (1); retrying in 281 ms
warning: unable to download 'git://git.ipxe.org/ipxe.git': Unsupported protocol (1); retrying in 658 ms
warning: unable to download 'git://git.ipxe.org/ipxe.git': Unsupported protocol (1); retrying in 1383 ms
warning: unable to download 'git://git.ipxe.org/ipxe.git': Unsupported protocol (1); retrying in 2547 ms
error: unable to download 'git://git.ipxe.org/ipxe.git': Unsupported protocol (1)


One or more packages failed to update:
ipxe: ExitFailure 1

ERROR: ExitFailure 1

When i omit the git:// prefix, it fetches via http and that doesn't work as the store output path just contains HTML of the gitweb's page.

Did i do it even right or is that a bug?

@nmattia
Copy link
Owner

nmattia commented Oct 2, 2019

Hi there!

Unfortunately niv doesn't handle git sources right now, it's tracked in #58 . I'm working on this right now, should hopefully be ready soon!

For context, the -t template should render to a URL. niv should probably emit a warning if that's not the case.

@nmattia
Copy link
Owner

nmattia commented Dec 7, 2019

You can now do the following:

$ niv add git git://git.ipxe.org/ipxe.git --ref master
Adding package ipxe
  Writing new sources file
Done: Adding package ipxe

The niv add git subcommand is still experimental. Looks like fetching the default branch doesn't always work, I created a ticket: #158

@nmattia nmattia closed this as completed Dec 7, 2019
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

2 participants