码迷,mamicode.com
首页 > 其他好文 > 详细

composer错误提示Cloning failed using an ssh key for authentication的解决方法

时间:2018-07-08 10:35:59      阅读:2825      评论:0      收藏:0      [点我收藏+]

标签:安装   spl   --   config   rip   错误   出现   方法   add   

  早上ytkah在测试laravel用composer安装一些插件时出现了一些错误,提示如下,是github的ssh密匙认证错误,提示要重新生成token,然后保存在/root/.config/composer/auth.json文件中

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+服务器名称+2018-07-08+0803
to retrieve a token. It will be stored in "/root/.config/composer/auth.json" for future use by Composer.

  首先到https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+服务器名称+2018-07-08+0803这个地址重新生成一下token,点击regenerate,复制生成的token

技术分享图片

  然后放到auth.json文件里(文件须有写入的权限)

    "github-oauth": {
        "github.com": "这里填token"},

  保存就可以了。

  也可以用第二种方法:composer config --global --auth github-oauth.github.com token系列号

You can also add it manually later by using "composer config --global --auth github-oauth.github.com <token>"

  看看auth.json文件是不是变了

  再看看composer安装是不是已经可以了

 

composer错误提示Cloning failed using an ssh key for authentication的解决方法

标签:安装   spl   --   config   rip   错误   出现   方法   add   

原文地址:https://www.cnblogs.com/ytkah/p/9279140.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!