博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
composer错误提示Cloning failed using an ssh key for authentication的解决方法
阅读量:7038 次
发布时间:2019-06-28

本文共 907 字,大约阅读时间需要 3 分钟。

  早上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 reposHead to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+服务器名称+2018-07-08+0803to 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

github ssh key 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 
"

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

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

 

转载地址:http://hdnal.baihongyu.com/

你可能感兴趣的文章
五周第四次课(11月16日) 8.6 管道符和作业控制 8.7/8.8 shell变量 8.9 环境变量配置文件...
查看>>
移动端web开发click touch tap区别
查看>>
11.20 正则介绍 , grep
查看>>
你的数据化经营为何屡战屡败,118位CTO给出的7个管理经验
查看>>
未来酒店——建设高效研发团队的经验分享
查看>>
LVS NAT模式搭建
查看>>
安装PHP5,安装PHP7
查看>>
yum更换国内源,yum下载rpm包和源码包的安装
查看>>
rpm包介绍 rpm工具用法 yum工具用法
查看>>
iOS 10 的推送 User Notifications Framework
查看>>
技术工坊|区块链中的p2p网络(上海)
查看>>
df命令、du命令、磁盘分区
查看>>
面试题:
查看>>
JVM Garbage First(G1) 垃圾收集器
查看>>
Spring Cloud构建微服务架构分布式配置中心
查看>>
Map集合
查看>>
Java干货分析:学习JVM须知的四大知识要点
查看>>
Qt5开发及实例学习之位置函数
查看>>
IDEA设置自动生成序列化id
查看>>
Python用户画像准确性评测 ——拨开python大数据分析的面纱
查看>>