2017-09-06 6 views
0
cordova plugin add http://gitlab.com/<user>/<private-repo>.git 

GitLabのプライベートレポからコードバプラグインを追加できません。私は上記のコマンドを実行すると、それは私に次のエラーがスローされます。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: 

:私はコルドバ7.0.1

を使用しています私は、ステータスコードが401である私は、パスワードプロンプトを受け入れたことがわかりますプライベートレポからフェッチするためのものですが、残念ながらそうではありません。 similar questionが頼まれましたが、私はリポジトリを複製してローカルフォルダ経由で追加したくありません。どんな種類の助けにも感謝します。ありがとう:)

答えて

0

あなたはこのプラグインをno-fetchする必要があります。だから、あなたはそのコマンドを実行する必要があります。

sudo cordova plugin add http://gitlab.com/<user>/<private-repo>.git --save --nofetch 

よろしく

+0

私はこれを試しましたが、動作しません。回答ありがとうございます。 –

+0

mmmmm ....だからあなたのログは何を言いますか? –

+0

上記と同じエラーが発生します。 –

0

コルドバの最新バージョンを使用してプライベートGitLabリポジトリからプラグインを追加するには、以下を試してみてください。

cordova plugin add git+ssh://[email protected]:<group|user>/<repo>#<branch> 
関連する問題