Dvc: api/get: cannot show url for git only repos

Created on 17 Jan 2020  Â·  3Comments  Â·  Source: iterative/dvc

There's no straight way to support direct url to files in git repos unless we do some kind of magic.

Currently, --show-url fails with:

➜ dvc get https://github.com/schacon/cowsay install.sh --show-url          
ERROR: failed to show url {} - URL 'https://github.com/schacon/cowsay' is not a dvc repository.

Similarly, dvc.api.get_url:

> import dvc.api
> dvc.api.get_url("install.sh", repo="https://github.com/schacon/cowsay")
UrlNotDvcRepoError: URL 'https://github.com/schacon/cowsay' is not a dvc repository.
discussion feature request p2-medium

Most helpful comment

@skshetry , I would way for someone to request this :sweat_smile:

Good suggestion, showing the _raw_ URL would work, but I'm not sure how useful would it be.

All 3 comments

Not clear how what it should show.

This issue is just opened for discussion.

But, one idea was to use https://raw.github.com/username/project/master/file.txt kind of URL if it's a GitHub repo.

@skshetry , I would way for someone to request this :sweat_smile:

Good suggestion, showing the _raw_ URL would work, but I'm not sure how useful would it be.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kevin-hanselman picture kevin-hanselman  Â·  37Comments

Casyfill picture Casyfill  Â·  56Comments

gvyshnya picture gvyshnya  Â·  36Comments

yukw777 picture yukw777  Â·  45Comments

jorgeorpinel picture jorgeorpinel  Â·  45Comments