Home  >  Article  >  Development Tools  >  What to do if a username error occurs in composer install

What to do if a username error occurs in composer install

藏色散人
藏色散人forward
2020-08-17 14:13:292647browse

The following tutorial column of composer will introduce to you the solution to the username error that appears in composer install. I hope it will be helpful to friends in need!

What to do if a username error occurs in composer install

C:\Users\huy\AppData\Roaming\Composer\auth.json

Things The process:

The corresponding project has been pulled from the project in the git server before, but an authentication error occurred when pulling this time; the reason is There's something wrong with my username.

Error report:

## [RuntimeException] Failed to execute git clone --no-checkout "https://hy:***@gitlab.xnhd.com/x
/core.git" "D:\wnmp\wwwroot\test\www.xnhd.com\vendor\ xnhd\core" && cd /D "D
:\wnmp\wwwroot\test\www.xnhd.com\vendor\xnhd\core" && git remote add compos
er "https://hy:** *@gitlab.xnhd.com/x/core.git" && git fetch composer
Cloning into 'D:\wnmp\wwwroot\test\www.xnhd.com\vendor\xnhd\core'...
fatal: Authentication failed for 'https://hy:***@gitlab.xnhd.com/x/core.git
/'

Solution:

Enter the Users directory of the C drive, C:\Users\huy\AppData\Roaming\Composer\auth. json Edit the auth.json file and change the username and password to the correct username and password.

The above is the detailed content of What to do if a username error occurs in composer install. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:csdn.net. If there is any infringement, please contact admin@php.cn delete