There are several ways to clone repositories available on GitHub.

When you view a repository while logged in to your account, the sidebar shows a choice of URLs you can use to clone the project onto your computer:

Remote url list

Cloning with SSH

These URLs provide access to a Git repository via SSH, which is a secure protocol. To use these URLs, you must have an SSH keypair generated on your computer, and attached to your GitHub account.

Although SSH is a bit more work to get set up correctly, it's also the most secure. The GitHub desktop clients automatically configure SSH keys for you, if you don't want to muck around on the command line.

Tip: SSH URLs can be used locally, or, as a secure way of deploying your code to production servers. You can also use SSH agent forwarding with your deploy script to avoid managing keys on the server.

Cloning with HTTPS

The https:// clone URLs are available on all repositories, public and private.
They are smart, so they will provide you with either read-only or read/write access, depending on your permissions to the repository.

These URLs are less secure, but they work everywhere. In general, they should be used for users that are behind a firewall or proxy. In these cases, if you'd rather use SSH, you might be able to use SSH over the HTTPS port.

Tip: You don't have to enter your password every time you use an HTTPS URL. We have a guide on password caching.

Further reading