I have my project in magento 2.3.3 and I am upgrading it to Magento 2.4.2.
In auth.json file I want to add github token generated from the link https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+NTZ-CPU-155+2021-04-09+1517
.
But the token is not working when I am adding the same in mu auth.json file.
Error I am getting:
Your github oauth token for github.com contains invalid characters: "ghp_1nKdhaeIbUzRN2DsrMDkB2kbLXzFcn0jwjhdwhaQyEt"
As mentioned in "Authentication token format updates are generally available", the format of GitHub authentication tokens has changed.
Notably, the token formats now include the following updates:
ghp_
for Personal Access Tokens.That is why composer has issue 9800: "Please release a version with updated GitHub token regex"
The resolution is to upgrade composer to 2.0.12 and 1.10.21, which include commit dc83ba9.