Closed
Description
i use private gitlab, the vue-cli version is 2.8.2
if i clone with project-name like this
vue init -c gitlab.com:username/my-vue-template test
it show err:
vue-cli · Failed to download repo vuejs-templates/test: 'git clone' failed with status 128
it seems that the order of argument is wrong
use this cammnd is work fine
vue init -c test gitlab.com:username/my-vue-template
and this
vue-init gitlab.com:username/my-vue-template test
Activity
posva commentedon Jul 13, 2017
From readme:
yangblink commentedon Jul 13, 2017
@posva thanks for quick prompt
I mean it's should
or it's just the bug of my
commander
moduleposva commentedon Jul 13, 2017
I see the bug, I'll fix it
posva commentedon Jul 13, 2017
I gave it a look but I don't understand why the order is being messed up when loading the args. Can you take a quick look @egoist , please?
posva commentedon Jul 13, 2017
BTW, using the option at the end works as expected
mrcsmcln commentedon Jul 17, 2017
Not sure if this helps, but this appears to work (just replace
vue init
withvue-init
):bajras commentedon Jul 27, 2017
Im having a similar kind of issue with the custom template and its hosted in my work's private bitbucket repo and get the following error:
vue-cli · Failed to download repo ssh://git@bitbucket.moo.com:7999/mac/vue-moo-webpack-boilerplate.git: 'git clone' failed with status 128
I tried all the mentioned steps:
vue init -c ssh://git@bitbucket.moo.com:7999/mac/vue-moo-webpack-boilerplate.git yay
vue init ssh://git@bitbucket.moo.com:7999/mac/vue-moo-webpack-boilerplate.git --clone yay
When I put in on a public Github repo it works fine but not sure why its not working with the private bitbucket repo?
When I do git clone bitbucket of the exact repo it works fine as so I can tell its not the connection issue with SSH.
git clone ssh://git@bitbucket.moo.com:7999/mac/vue-moo-webpack-boilerplate.git
Any help would be highly appreciated. Thanks.
mrcsmcln commentedon Jul 27, 2017
@bajras did you try replacing
vue init
withvue-init
?bajras commentedon Jul 27, 2017
@mrcsmcln yes, that didnt work either.
winnieBear commentedon Jul 28, 2017
me too, In Window OS. I pull a request fix the bug.
lee-chase commentedon Aug 16, 2017
commander appears to be switching the order of the args.
vue init a b
Program.args[0] === a
Program.args[1] === b
vue init -c a b
Program.args[0] === b
Program.args[1] === a
Perhaps an iterating through an object with no guarantee of order.
lee-chase commentedon Aug 16, 2017
Running
vue init --clone a b
Causes Commander.prototype.parse to be run twice. First for 'vue' which results in '--clone a' being seen as an unknown parameter. The unknown parameters are then tacked back on in Commander.prototype.parseArgs.
Personally, I'd see this as a bug in Commander which could do better with named arguments. That said --clone is not a named argument, it is being used as a switch and Commander does not seem to support argumentless switches.
It is perhaps less confusing to suggest users use the following command
vue init --clone=true a b
10 remaining items