I have two private repos in Bitbucket.
- Repo One (User doesn't have access to this repo)
- Repo Two (User has write access to this repo)
Inside repo two, I am fetching Repo one as dependency
"repositories": [
{
"type": "vcs",
"url": "git@bitbucket.org:myproject/repo-one.git"
}
],
"require": {
"myproject/repo-one": "dev-dev"
}
I have created auth.json in the project root.
{
"config": {
"http-basic": {
"bitbucket.org": {
"username": "accessTokenEmail",
"password": "accessToken"
}
},
"bitbucket-oauth": {
"bitbucket.org": {
"consumer-key": "myKey",
"consumer-secret": "mySecret"
}
},
"bearer": {
"bitbucket.org": "accessToken"
}
}
}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?
Thanks.