From 639c0fb5ce5866bd2150d1adcd5d2e68e82cce4b Mon Sep 17 00:00:00 2001 From: Matteo Date: Tue, 10 Jan 2017 13:46:33 +0100 Subject: [PATCH 1/3] Update 05-repositories.md Refer to #6056 --- doc/05-repositories.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/05-repositories.md b/doc/05-repositories.md index 732198bf0..eee342ffb 100644 --- a/doc/05-repositories.md +++ b/doc/05-repositories.md @@ -292,6 +292,26 @@ repository as it would with any other git repository instead of using the GitHub API. But unlike using the `git` driver directly, Composer will still attempt to use github's zip files. +Please note: +* **To let Composer choose which driver to use** the repository type needs to be defined as "vcs" +* **BitBucket driver** require the OAuth method to access to BitBucket REST APIs. +If you want to know how to create a OAuth consumer using BitBucket, please refer to [this link](https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html). +After created an OAuth consumer, you need to setup your composer.json config section with +the requested credentials like this (more info [here](https://getcomposer.org/doc/06-config.md#bitbucket-oauth)): +```json +{ + "config": { + "bitbucket-oauth": { + "bitbucket.org": { + "consumer-key": "myKey", + "consumer-secret": "mySecret" + } + } + + } +} +``` + #### Subversion Options Since Subversion has no native concept of branches and tags, Composer assumes From 60cf410acf20087de1aec3809964a6ee76f4146e Mon Sep 17 00:00:00 2001 From: Matteo Date: Tue, 10 Jan 2017 15:09:03 +0100 Subject: [PATCH 2/3] Update 05-repositories.md Another thing noted while trying to solve the problem here #6056 --- doc/05-repositories.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/05-repositories.md b/doc/05-repositories.md index eee342ffb..8a8f13717 100644 --- a/doc/05-repositories.md +++ b/doc/05-repositories.md @@ -311,6 +311,7 @@ the requested credentials like this (more info [here](https://getcomposer.org/do } } ``` +* **If you already used a private repository**, this means Composer should have cloned it in cache. If you want to install the same package with drivers, remember to launch the command `composer clearcache` followed by the command `composer update` to update composer cache and install the package from dist. #### Subversion Options From 9e605c85e20a09820c8aae0ea54e89397da4885e Mon Sep 17 00:00:00 2001 From: Matteo Date: Tue, 10 Jan 2017 15:19:54 +0100 Subject: [PATCH 3/3] Update 05-repositories.md another thing forgot learned here #6056 and here https://github.com/composer/composer/issues/5166#issuecomment-226110812 --- doc/05-repositories.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/05-repositories.md b/doc/05-repositories.md index 8a8f13717..f9b6a6655 100644 --- a/doc/05-repositories.md +++ b/doc/05-repositories.md @@ -295,7 +295,8 @@ attempt to use github's zip files. Please note: * **To let Composer choose which driver to use** the repository type needs to be defined as "vcs" * **BitBucket driver** require the OAuth method to access to BitBucket REST APIs. -If you want to know how to create a OAuth consumer using BitBucket, please refer to [this link](https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html). +If you want to know how to create a OAuth consumer using BitBucket, please refer to [this link](https://confluence.atlassian.com/bitbucket/oauth-on-bitbucket-cloud-238027431.html). +**Remember** to fill the callback url (even with a casual address) to makes OAuth 2 work. After created an OAuth consumer, you need to setup your composer.json config section with the requested credentials like this (more info [here](https://getcomposer.org/doc/06-config.md#bitbucket-oauth)): ```json