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!
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!