From de6d7adb091b6e691f26c9bb439f4083218f23fe Mon Sep 17 00:00:00 2001 From: Edmund Turbin <785171+spicecadet@users.noreply.github.com> Date: Sun, 27 Aug 2023 17:10:50 +0100 Subject: [PATCH] Document support for GitHub token authentication (#177) * Added documentation for #84 * fixed spacing issue * Uppercase * Uppercase * Remove trailing spaces * Update `README.md` * Remove remaining trailing space --------- Co-authored-by: Edmund Turbin Co-authored-by: Daniel Bachhuber Co-authored-by: Daniel Bachhuber --- README.md | 7 +++++++ src/Package_Command.php | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/README.md b/README.md index c7de6d6b..567a7220 100644 --- a/README.md +++ b/README.md @@ -151,6 +151,13 @@ reference breaks. When installing a .zip file, WP-CLI extracts the package to `~/.wp-cli/packages/local/`. +If Github token authorization is required, a GitHub Personal Access Token +(https://github.com/settings/tokens) can be used. The following command +will add a GitHub Personal Access Token to Composer's global configuration: +composer config -g github-oauth.github.com +Once this has been added, the value used for will be used +for future authorization requests. + **OPTIONS** diff --git a/src/Package_Command.php b/src/Package_Command.php index e50d6662..72807bae 100644 --- a/src/Package_Command.php +++ b/src/Package_Command.php @@ -188,6 +188,13 @@ public function browse( $_, $assoc_args ) { * When installing a .zip file, WP-CLI extracts the package to * `~/.wp-cli/packages/local/`. * + * If Github token authorization is required, a GitHub Personal Access Token + * (https://github.com/settings/tokens) can be used. The following command + * will add a GitHub Personal Access Token to Composer's global configuration: + * composer config -g github-oauth.github.com + * Once this has been added, the value used for will be used + * for future authorization requests. + * * ## OPTIONS * *