1. Create a account in https://github.com/ and create a new repository by clicking "Create a new project"
2. Apt install github in ubuntu, actually you can use different ways in different OS, quite easy.
3. Now you have to config ssh, hopefully installed already, otherwise install it. Check with this:
mickey@ubuntu:~$ ssh
usage: ssh [-1246AaCfGgKkMNnqsTtVvXxYy] [-b bind_address] [-c cipher_spec]
[-D [bind_address:]port] [-E log_file] [-e escape_char]
[-F configfile] [-I pkcs11] [-i identity_file] [-L address]
[-l login_name] [-m mac_spec] [-O ctl_cmd] [-o option] [-p port]
[-Q query_option] [-R address] [-S ctl_path] [-W host:port]
[-w local_tun[:remote_tun]] [user@]hostname [command]
Generating public/private rsa key pair.
Enter file in which to save the key (/home/mickey/.ssh/id_rsa):
Created directory '/home/mickey/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/mickey/.ssh/id_rsa.
Your public key has been saved in /home/mickey/.ssh/id_rsa.pub.
The key fingerprint is:
SHAsdfsspEdfdfNsdf6t98+LOIF/Gfu1yM mickey@ubuntu
The key's randomart image is:
+---[RSA 2048]----+
| o.+o+ . |
|+.+o= = o |
|++o..O + |
|o+...oOo |
| .o .+oS |
| ...= |SSH and GPG keys
| .o.o.o . |
| o..=o E o |
| ..o.+=o . . |
+----[SHA256]-----+
mickey@ubuntu :~$ cd ~/.ssh
mickey@ubuntu :~/.ssh$ cat id_rsa.pub
mickey@ubuntu:~/github$ git init
Initialized empty Git repository in /home/mickey/github/.git/
mickey@ubuntu:~/github$ git add -A
mickey@ubuntu:~/github$ git remote add origin https://github.com/xxxxxx/xxx.gitmickey@ubuntu:~/github$ git commit -m “test”
Initial commit
nothing to commit
mickey@ubuntu:~/github$ git push -u origin master