2.9.3
https://github.com/vuejs/vue-cli/tree/master
Please forgive the invalid repro link, not sure what to put for a cli issue
My template repo is within a subgroup, I'm running the following:
vue init --clone my-project gitlab:my-own-gitlab.com:group-a/subgroup-a/template-repo
Template should be initialized from:
my-own-gitlab.com/group-a/subgroup-a/template-repo
vue-cli · Failed to download repo ... 'git clone' failed with status 128
Same happens for version 3.0.0-beta.6 when targeting a self-hosted BitBucket.
download-git-repo has a direct command, could we utilise this maybe?
https://github.com/flipxfx/download-git-repo/issues/19
[ code ] ◉ vue create --preset https://stash.big.local/projects/WEB/repos/vue-cli-plugins --clone my-project
✔ Fetching remote preset https://stash.big.local/projects/WEB/repos/vue-cli-plugins...
ERROR Failed fetching remote preset https://stash.big.local/projects/WEB/repos/vue-cli-plugins:
ERROR Error: 'git clone' failed with status 128
Error: 'git clone' failed with status 128
at ChildProcess.<anonymous> (/Users/andreas.virkus/.npm-global/lib/node_modules/@vue/cli/node_modules/git-clone/index.js:33:22)
at emitTwo (events.js:125:13)
at ChildProcess.emit (events.js:213:7)
at maybeClose (internal/child_process.js:927:16)
at Socket.stream.socket.on (internal/child_process.js:348:11)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at Pipe._handle.close [as _onclose] (net.js:549:12)
@affanshahid same here, is there any solution for this problem?
env: mac pro
verision: 2.9.3
i get it done finally after i check out the repo ‘download-git-repo’ . it has listed the solutions.
repo
@affanshahid
@andreasvirkus
@yyx990803 The issue is also present for 3.x. Should I create a separate ticket for this (although I feel the fix should be universal, right?)
3.x init is just a bridge to 2.x code.
@yyx990803 I don't mean init but create. I'd wish to use a preset from an internal, self-hosted bitbucket, so I'm trying to run
[ code ] ◉ vue create --preset https://stash.big.local/projects/WEB/repos/vue-cli-plugins --clone my-project
Please see my initial comment above with the error I'm getting
@andreasvirkus ah got it, I've updated the description.
Fixed by #1880
With 3.0.2 I'm still having an issue with getting this to work.
This is the command I'm using with a privately hosted bitbucket server at stash.myserver.com:
vue create --preset stash.myserver.com/projects/EXP/repos/vue-cli-plugin-init --clone my-project
Returns with an error of:
✔ Fetching remote preset stash.myserver.com/projects/EXP/repos/vue-cli-plugin-init...
ERROR Failed fetching remote preset stash.myserver.com/projects/EXP/repos/vue-cli-plugin-init:
ERROR Error: 'git clone' failed with status 128
Error: 'git clone' failed with status 128
at ChildProcess.<anonymous> (/Users/ .... /.nvm/versions/node/v8.11.3/lib/node_modules/@vue/cli/node_modules/git-clone/index.js:33:22)
at emitTwo (events.js:126:13)
at ChildProcess.emit (events.js:214:7)
at maybeClose (internal/child_process.js:925:16)
at Socket.stream.socket.on (internal/child_process.js:346:11)
at emitOne (events.js:116:13)
at Socket.emit (events.js:211:7)
at Pipe._handle.close [as _onclose] (net.js:557:12)
Here is a second failed test, as I'm not 100% certain about the command syntax. In this case it just sits forever with no error:
vue create --preset bitbucket:stash.myserver.com:myusername/exp/vue-cli-plugin-init --clone my-project-test
⠹ Fetching remote preset bitbucket:stash.myserver.com:myusername/exp/vue-cli-plugin-init...The authenticity of host 'stash.myserver.com (xx.xxx.xxx.xx)' can't be established.
ECDSA key fingerprint is SHA256:......
⠸ Fetching remote preset bitbucket:stash.myserver.com:myusername/exp/vue-cli-plugin-init...
I've also tried various iterations of the git path, but always have one of the two same issues.
For reference, the git clone URL looks like this. Note the specified port in the ssh url - not sure if that matters:
ssh://[email protected]:PORT/exp/vue-cli-plugin-init.git
https://[email protected]/scm/exp/vue-cli-plugin-init.git
I'm also getting the status 128 message when trying to clone down a private GitHub repo that I've made for a custom Vue preset.
I am also seeing this issue with vue-cli version 3.2.1.
Furthermore I have published my preset in a private npm registry with a scope and running vue create --preset @myscope/vue-cli-preset-mypreset --clone myapp does not work either, but I guess this is a separate feature request, isn‘t it?
Any progress, please?
@guirreri @austriker27 @bodograumann @JimmyLv
It worked for me on a private, self-hosted gitlab and I'm using vue CLI 3.3.0.
My command looked like vue create --preset https://gitlab.server.com:group/preset --clone my-project
@guirreri According to https://github.com/flipxfx/download-git-repo you need to use ":" after the hostname and before the username.
You should try vue create --preset https://stash.myserver.com:projects/EXP/repos/vue-cli-plugin-init --clone my-project. Note the ":".
@bodograumann download-git-repo is meant to download a git repository on GitHub, GitLab or Bitbucket, not an npm package.
If you're still having trouble, I'd recommend you to create a new, fresh empty folder, install download-git-repo (link above) and try it for yourself in a simple node script until you can make it work.
@Kendaros
Thank you for your help.
Unfortunately the documentation does not mention that the preset location should be given in the download-git-repo format.
Additionally, my tests show the following:
vue create --preset gitlab:my-gitlab-server.com:group/projectname --clone my-project worksvue create --preset https://my-gitlab-server.com:group/projectname --clone my-project works, but it is not possible to enter username and password on the command line then.ssh:// doesn’t seem to work, for that you have to use the “direct” syntax:vue create --preset direct:ssh://[email protected]/group/projectname.git is ok.git to any of the short forms is not allowed.@yyx990803, do you think you can add a note on self-hosted repos to the docs?
ok, i'm back here again....
just try this vue create -p direct:ssh://[email protected]:333/vue-tpl.git --clone
whatever. it does work for me since i found the direct command a few mounth ago