Chapter 2. Git & GitHub Initial Settings

GitHub Access Authentication Settings

You can access Remote Repositories on GitHub from the command line in two ways: HTTPS and SSH. When you clone the repository or establish remote settings, you can choose the method of authentication by your URL choice. Git provides different URLs of a Remote Repository for HTTPS and SSH.

HTTPS

HTTPS uses username and PAT (Personal Access Token) as an account verification approach. Previously, we used GitHub password instead of PAT. To enhance security, GitHub introduced PAT. You need to generate PAT prior to using HTTPS. HTTPS is considered faster than SSH and you can usually work with all repositories on GitHub over HTTPS, even if you are behind a firewall or proxy. The way to generate PAT is explained on the next page.

SSH

SSH uses a pair of secret key and public key. You need to generate a key pair and upload the public key onto the GitHub account site. SSH can be slower than HTTPS, however, you can add several settings using the config file. Firewalls and proxies might refuse to allow SSH connections. In that case, you need to add proxy server settings in the Git system. The way to add SSH settings in GitHub will be explained later.

You can access Remote Repositories on GitHub from the command line in two ways: HTTPS and SSH. When you clone the repository or establish remote settings, you can choose the method of authentication by your URL choice. Git provides different URLs of a Remote Repository for HTTPS and SSH.

HTTPS

HTTPS uses username and PAT (Personal Access Token) as an account verification approach. Previously, we used GitHub password instead of PAT. To enhance security, GitHub introduced PAT. You need to generate PAT prior to using HTTPS. HTTPS is considered faster than SSH and you can usually work with all repositories on GitHub over HTTPS, even if you are behind a firewall or proxy. The way to generate PAT is explained on the next page.

SSH

SSH uses a pair of secret key and public key. You need to generate a key pair and upload the public key onto the GitHub account site. SSH can be slower than HTTPS, however, you can add several settings using the config file. Firewalls and proxies might refuse to allow SSH connections. In that case, you need to add proxy server settings in the Git system. The way to add SSH settings in GitHub will be explained later.