composer错误提示Cloning failed using an ssh key for authentication, enter your GitHub credentials的解决方法

composer install 报错Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos

    • 执行composer install 报错

执行composer install 报错

$ composer install                 
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 53 installs, 0 updates, 0 removals
  - Installing bower-asset/jquery (3.5.1): Downloading (failed)       
Downloading (failed)       
Downloading (failed)    Failed to download bower-asset/jquery from dist: The "https://api.github.com/repos/jquery/jquery-dist/zipball/4c0e4becb8263bb5b3e6dadc448d8e7305ef8215" file could not be downloaded: failed to open stream: Connection reset by peer
    Now trying to download from source
  - Installing bower-asset/jquery (3.5.1): Cloning 4c0e4becb8
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+qipa50+2020-09-15+0332
to retrieve a token. It will be stored in "/root/.config/composer/auth.json" for future use by Composer.
Token (hidden): 

composer错误提示Cloning failed using an ssh key for authentication, enter your GitHub credentials的解决方法_第1张图片

首先到https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+qipa50+2020-09-15+0332这个地址重新生成一下token,点击Generate token,复制生成的token

composer错误提示Cloning failed using an ssh key for authentication, enter your GitHub credentials的解决方法_第2张图片

composer错误提示Cloning failed using an ssh key for authentication, enter your GitHub credentials的解决方法_第3张图片粘贴入token,提示 Token stored successfully.
在这里插入图片描述

你可能感兴趣的:(Php,Git,Composer)