I'm trying to update composer but it gives below error.
root@magento-2:/var/www/html/magento# composer clear-cache root@magento-2:/var/www/html/magento# composer diagnose Do not run Composer as root/super user! See https://getcomposer.org/root for details Checking composer.json: WARNING The version field is present, it is recommended to leave it out if the package is published on Packagist. Defining autoload.psr-0 with an empty namespace prefix is a bad idea for performance require.magento/product-community-edition : exact version constraints (2.1.3) should be avoided if the package follows semantic versioning require.composer/composer : unbound version constraints (@alpha) should be avoided Checking platform settings: OK Checking git settings: OK Checking http connectivity to packagist: OK Checking https connectivity to packagist: WARNING [Composer\Downloader\TransportException] The "https://packagist.org/packages.json" file could not be downloaded: failed to open stream: Connection timed out Checking github.com rate limit: OK Checking disk free space: OK Checking pubkeys: OK Checking composer version: OK
I also visited https://getcomposer.org/doc/articles/troubleshooting.md & SO