GitHub is a website that is used to share files, typically code, so that others can download and use the shared code. As an example, the first thing most any programmer learns is how to create the Hello World index.html web page. At GitHub, you could search "Hello World HTML". Something like this will be displayed. Let's select the first result.
In this example, index.html contains the code that will produce the Hello World page. You can select index.html to view the code.
There is a Clone or download button. Selecting Download ZIP will download something like hello-world.zip to your local PC.
Or, if you have Git installed on your PC, you can use the git clone command to download the files to your local PC.
AVOID TROUBLE
On August 13 2021, GitHub removed support for password authentication when attempting to clone a repository over HTTPS. Follow these steps to setup SSL key based authentication.
- Sign into https://github.com/.
- Select your profile > Settings.
- Select SSH and GPG Keys.
- Select New SSH Key.
- Paste the content of your /home/your_username/.ssh/id_rsa.pub public certificate and select Add SSH Key.
When connecting to a repository on https://github.com/, you will always use username git. If some other username is used, the connection will fail.
C:\Users\jeremy>git clone ssh://git@github.com/bertvv/hello-world.git
Cloning into 'hello-world'...
remote: Enumerating objects: 393, done.
Receiving objects: 75% (295/393)ed 0 (delta 0), pack-reused 393Receiving objects: 72% (283/393)
Receiving objects: 100% (393/393), 67.47 KiB | 463.00 KiB/s, done.
Resolving deltas: 100% (172/172), done.
Did you find this article helpful?
If so, consider buying me a coffee over at