You are reading the documentation for version 2.2. Magento 2.3 is the latest version available. Ensure you are reading the documentation for your version of Magento.

Cannot clone the Magento GitHub repository

Detail

Error is similar to the following:

1
2
3
Cloning into 'magento2'...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly

Solution

Upload your SSH key to GitHub as discussed in the GitHub help page.