Help needed: Web development 101 Step 3.3 - Connect the Local Repository to the Remote Repository [Solved]


#1

Hi everyone,
I need help to resolve the following error while following step 3.3 of web dev 101 (Connect the Local Repository to the Remote Repository)
Thanks in advance!

//
$ git push -u origin master
The authenticity of host ‘github.com (xxx)’ can’t be established.
RSA key fingerprint is xxx
Are you sure you want to continue connecting (yes/no)?
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
//

Any help would be much appreciated!

Regards,
Dillon


#2

What’s the output of git remote -v


#3

origin git@github.com:sgdillon/odin_first_rails_app.git (fetch)
origin git@github.com:sgdillon/odin_first_rails_app.git (push)


#4

Can you also let me know the output of ssh -T git@github.com


#5

The authenticity of host ‘github.com (13.229.188.59)’ can’t be established.
RSA key fingerprint is xxx.
Are you sure you want to continue connecting (yes/no)?
Host key verification failed.


#6

Did you upload your ssh key to github?


#7

Yes i did.
Everything was going accordingly to instructions until this step.


#8

Type ssh-keygen -R github.com

and try again.


#9

$ ssh-keygen -R github.com
do_known_hosts: hostkeys_foreach failed: No such file or directory


#10

ssh-keyscan -H github.com >> ~/.ssh/known_hosts

Run that then try again.


#11

i tried $ ssh -T git@github.com again and got the following result:

The authenticity of host ‘github.com (13.229.188.59)’ can’t be established.
RSA key fingerprint is xxx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘github.com,13.229.188.59’ (RSA) to the list of known hosts.
Hi sgdillon! You’ve successfully authenticated, but GitHub does not provide shell access.


#12

Nice.

Looks like it’s working.


#13

Continued with below and seems to be working!
Really appreciate your help!
Thank you!

$ git add .
$ git commit -m “initial commit”
On branch master
nothing to commit, working tree clean
$ git remote add origin git@github.com:sgdillon/my_first_rails_app.git
fatal: remote origin already exists.
$ git push -u origin master
Enumerating objects: 112, done.
Counting objects: 100% (112/112), done.
Delta compression using up to 4 threads
Compressing objects: 100% (97/97), done.
Writing objects: 100% (112/112), 26.75 KiB | 2.06 MiB/s, done.
Total 112 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), done.
To github.com:sgdillon/my_first_rails_app.git

  • [new branch] master -> master
    Branch ‘master’ set up to track remote branch ‘master’ from ‘origin’.