First we have to make the system to push:
From windows you can use git bash or from unix based system terminal window you can use
Step 1: First we have to check for ssh key
ls -al ~/.ssh
if those files are not present
then we have to genrate new ssh key
Step 2: Generate new ssh key
ssh-keygen -t rsa -b 4096 -C "[email protected]"
then follow these steps
Enter file in which to save the key (/Users/you/.ssh/id_rsa): [Press enter]
Enter passphrase (empty for no passphrase): [Type a passphrase] Enter same passphrase again: [Type passphrase again]
here enter the passphrase
Step 3: Add ssh key to the ssh-agent
Follow the code to enter in terminal or git bash
# start the ssh-agent in the background ssh-agent -s
eval $(ssh-agent -s)
Step 4: Add ssh key to your github account
clip < ~/.ssh/id_rsa.pub
if it give some errors then you can type this
cat ~/.ssh/id_rsa.pub | clip
Now got to your github account>settings>ssh keys>add ssh key
and open the id_res.pub file with a text editor and copy the text and paste on the github key>give it a name
Step 5:Test the conenction
ssh -T [email protected]
then this message will come
The authenticity of host 'github.com (18.104.22.168)' can't be established. RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. Are you sure you want to continue connecting (yes/no)?
and then this will come
Hi username! You've successfully authenticated, but GitHub does not provide shell access.
voila! you are done 😀
Now system is done now we have the time to push:
Now you can clone the repository you created in your github i will show it in future after cloning go to your named directory and type the commands below
git add .
git commit -m "Here is your commit message"