Khu*_*hra 2 git gitlab cordova ionic-framework cordova-plugins
cordova plugin add http://gitlab.com/<user>/<private-repo>.git
Run Code Online (Sandbox Code Playgroud)
我无法从 GitLab 中的私有存储库添加cordova 插件。当我运行上述命令时,它会引发以下错误:
Error: Failed to fetch plugin http://gitlab.com/<user>/<private-repo>.git via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: npm: Command failed with exit code 1 Error output:
npm ERR! fetch failed http://gitlab.com/<user>/<private-repo>.git
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 401
npm ERR! fetch failed http://gitlab.com/<user>/<private-repo>.git
npm WARN retry will retry, error on last attempt: Error: fetch failed with status code 401
npm ERR! fetch failed http://gitlab.com/<user>/<private-repo>.git
npm ERR! Darwin 16.7.0
npm ERR! argv "~/.nvm/versions/node/v6.4.0/bin/node"
"~/.nvm/versions/node/v6.4.0/bin/npm" "install"
"http://gitlab.com/<user>/<private-repo>.git" "--save"
npm ERR! node v6.4.0
npm ERR! npm v3.10.3
npm ERR! fetch failed with status code 401
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! <https://github.com/npm/npm/issues>
npm ERR! Please include the following file with any support request:
Run Code Online (Sandbox Code Playgroud)
注意:我使用的是cordova 7.0.1
我可以看到状态代码是 401。我正在接受一个密码提示以从私人仓库中获取,但不幸的是事实并非如此。 有人问过类似的问题,但我不想克隆 repo 并通过本地文件夹添加。任何形式的帮助将不胜感激。谢谢 :)
尝试使用最新版本的 Cordova 从私有 GitLab 存储库添加插件。
cordova plugin add git+ssh://git@gitlab.example.com:<group|user>/<repo>#<branch>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
3106 次 |
最近记录: |