diff --git a/src/Composer/Command/DiagnoseCommand.php b/src/Composer/Command/DiagnoseCommand.php
index c24b59290..26b3b8387 100644
--- a/src/Composer/Command/DiagnoseCommand.php
+++ b/src/Composer/Command/DiagnoseCommand.php
@@ -118,7 +118,7 @@ EOT
}
} catch (\Exception $e) {
if ($e instanceof TransportException && $e->getCode() === 401) {
- $this->outputResult('The oauth token for '.$domain.' seems invalid, run "composer config --global --unset github-oauth.'.$domain.'" to remove it');
+ $this->outputResult('The oauth token for github.com seems invalid, run "composer config --global --unset github-oauth.github.com" to remove it');
} else {
$this->outputResult($e);
}