Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private

Posted 换行程序员

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private 相关的知识,希望对你有一定的参考价值。

早上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

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 <token>"

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

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

以上是关于Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private 的主要内容,如果未能解决你的问题,请参考以下文章

Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse

小知识:springCloudConfigServer连接git报错:.c.s.e.MultipleJGitEnvironmentRepository : Error occured cloning

Python-requests-get-fails-with-403-forbidden-even-after-using-headers-and-session - PYTHON 3.8

Exception: Gradle build failed to produce an .apk file. It‘s likely that this file was generated und

URL validation failed. The error could have been caused through the use of the browser&#39;s nav

[PWA] Show an Error when a POST or DELETE Fails in an Offline PWA