I am a newbie at Git. I am still learning.
Here are the steps that I have taken in order to create the repository so far:
git init
git status
git add .
git commit -m "Initial Commit"
git push --set-upstream origin master
fatal: No configured push destination.
After the facing the above error, I tried to add the remote using the command:
git remote add origin git@github.com:username/repo-name
git push --set-upstream origin master
After hitting the above commands, I faced the error:
The authenticity of host 'github.com (IP)' can't be established.
So I tried to create an SSH key as suggested in this link. The SSH key was created successfully, but when I tried to add my SSH key to the ssh-agent using the following commands:
eval $(ssh-agent -s)
I encountered the following error:
'eval' is not recognized as an internal or external command
I also tried to execute ssh-agent -s
directly, but then I encountered the following error:
unable to start ssh-agent service, error :1058
I googled the issue and found this link. I tried to use the following commands:
> Set-Service ssh-agent -StartupType Manual
> install-sshd.ps1
But both have given me the following errors respectively:
> 'Set-Service' is not recognized as an internal or external command
> 'install-sshd.ps1' is not recognized as an internal or external command
By the way I am using Windows 10.
What should I do next?
Try and create an SSH key, for testing, without passphrase: you won't need an ssh-agent then.
ssh-keygen -t rsa -m PEM -P"" -C "your@email.com"
Copy the %USERNAME%\.ssh\id_rsa.pub
content to GitHub account.
Test it with ssh -T git@github.com
(type 'yes' if it asks you)
Finally, try your git push -u origin master
again.
Note... you still need to create an empty GitHub repo first on GitHub side.