Reputation: 47
Steps I did so far...
sudo ssh-keygen -t rsa -b 4096 -C "[email protected]"
ssh-add ~/.ssh/id_rsa
cat /home/mink/.ssh/id_rsa.pub
git init
git add README.md
git commit -m "first commit"
*** Please tell me who you are.
Run
git config --global user.email "[email protected]"
git config --global user.name "Your Name"
to set your account's default identity.
Omit --global to set the identity only in this repository.
git remote add origin [email protected]:navyblueyes/template-test.git
git push -u origin master
mink@DESKTOP-ALARD0U:/mnt/c/Users/Micha/.LocalCode/js-exercises/--templat$ git push -u origin master
ssh: Could not resolve hostname github.com: Temporary failure in name resolution
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
What am I missing?
Upvotes: 1
Views: 523
Reputation: 1324268
So I configure the user details [I thought I didn't need to do this because of the key setup????]
This (user.name/user.email) has nothing to do with remote repository hosting service authentication (which is why the SSH key is used for).
It is for local commits authorship.
Second, ping github.com: if it fails, that would mean a DNS resolution error.
If not, try, for testing, accessing the repository using HTTPS
git ls-remote https://github.com/navyblueyes/template-test.git
Try the same using SSH:
git -c 'core.sshCommand="ssh -v"' ls-remote https://github.com/navyblueyes/template-test.git
That last command will show you if your key is actually used.
Upvotes: 1