You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I have two private repos in Bitbucket.
Inside repo two, I am fetching Repo one as dependency
I have created auth.json in the project root.
I tried all three methods mentioned above but I am not able to fetch the private repo one.
I tried the above method individually in auth.json.
If I have access to both the repos then I am able to access the repo as a dependency in composer and that is normal.
I am using composer version as below
Composer version: 2.6.3
Am I doing anything wrong in this?
I'm not very familiar with composer, but if what composer does is clone the repo, then I see you are using an SSH URL for the repo:
and the credentials you provide in the auth.json file are for authentication over HTTPS.
If you use an SSH URL, then authentication will be done with the SSH keys available on the machine where the repo is cloned. If these SSH keys are associated with a Bitbucket user account, it is expected that the account will need to have access to the repos.
If you don't need the user's SSH keys on this machine, you can remove them (please take a backup before you do) and then
If you want to use HTTPS, you'll need to provide an HTTPS URL for the repo, like this
I'm not sure if the structure of your auth.json is correct, this is best to double-check in a composer-specific forum. However, if you are using a repository access token, then the username should be the string x-token-auth instead of an email.
If you are using an app password, then the username needs to be the username of the Bitbucket account you generated the app password for and it can be found here if it is your own account https://bitbucket.org/account/settings/.