Adding BitBucket OAuth consumer to composer
Create a OAuth consumer token in BitBucket
- Go to the workspace settings > OAuth Consumers > Add Consumers.
- Enter the Name, Callback URL and check This is a private consumer.
- Check the required permissions and click Save.
- Copy the consumer key and consumer secret.
Update the auth.json file
Edit
auth.json
filevim /root/.config/composer/auth.json
Remove the bitbucket credentials and add the following lines to the file
{
...
"bitbucket-oauth": {
"bitbucket.org": {
"consumer-key": "<consumer key>",
"consumer-secret": "<cmsumer secret>"
}
},
...
}Clear composer cache
composer clear-cache