degit
degit copied to clipboard
degit throws could not download file error on every try.
Hi!
I have tried using degit, but no matter what repo I try to clone it throws a ! could not download ...
error. I forked and cloned the repo was able to pinpoint the error to this line https://github.com/Rich-Harris/degit/blob/7531fbe9b752ad4e02ead547150d2e4ed1ec933a/src/index.js#L129
I've added a console.log right above the line and logged the caught error which gave me this output:

I've went further and located that it actually errors here on line 69: https://github.com/Rich-Harris/degit/blob/7531fbe9b752ad4e02ead547150d2e4ed1ec933a/src/utils.js#L66-L69
I think it is worth mentioning that I use volta for managing node versions, that may have an effect on permissions.
I'd be happy to help solve this, submit a PR or something, but at this point I don't know which direction I should go.
Same problem here. It started with a certificate problem with git that I fixed by temporarily disabling ssl checking for git. Could be ssl verification here too? (SSL decryption at firewall using cert). I'm getting the same error now on the same file: ! could not download https://github.com/sveltejs/template/archive/4b6ab60fe58c8404d674b58faa08659d832605cc.tar.gz
I don't see any SSL verification in the code though.
I got this error when trying to degit a private repository. README stated that it doesn't support private repository yet.
But I tried with -m=git
option, it works.
My home dir is not writable (because a bunch of tools like degit use it as a dumping ground) so I solved it by creating a writable ~/.degit
directory
I tried what @ducva did and got this:
after writing 'yes'...
Hope it helps.
PowerShell
$env:HTTPS_PROXY="http://127.0.0.1:1080"
cmd
set https_proxy=http://127.0.0.1:1080
I'm ok
PowerShell
$env:HTTPS_PROXY="http://127.0.0.1:1080"
cmdset https_proxy=http://127.0.0.1:1080
I'm ok
thank you, It works