composerでgitの公開レポジトリから下記のようにしてパッケージをインストールしようとしたら
composer.json
...
"repositories": [
{
"url": "git@github.com:pikanji/agent-plugin.git",
"type": "git"
}
]
}
認証がどうのでエラーになった。(Docker container内で実行したんで、Docker特有の問題かも。)
Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos
Head to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+9a20d36bf162+2017-11-19+0747
to retrieve a token. It will be stored in "/root/.composer/auth.json" for future use by Composer.
Token (hidden):
No token given, aborting.
You can also add it manually later by using "composer config --global --auth github-oauth.github.com <token>"
[RuntimeException]
Failed to execute git clone --mirror 'git@github.com:pikanji/agent-plugin.git' '/root/.composer/cache/vcs/git-github.com-pikanji-agent-plugin.git/'
レポジトリ定義をhttpsに変更したら、あっさり解決した。
composer.json
...
"repositories": [
{
"url": "https://github.com/pikanji/agent-plugin.git",
"type": "git"
}
]
}