Step 3.3: Hooking our local repository to the remote repository


#1

Hi there,

I am stuck in step 3.3.

I write in Git : "git remote add origin " but it returns “fatal: remote origin already exists.”

And after that I write and it returns "error: failed to push some refs to '.

PS: I did not write my true SSH URL in this topic.


#2

What is the full error you get?


#3

Only two errors:

“fatal: remote origin already exists.”

"error: failed to push some refs to '.

I just appears the two errors.


#4

If origin already exists you don’t need to add it.

Try the two following commands and let me know what you get back.

git remote -v

ssh -T git@github.com

#5

Hi,

“$ git remote -v
origin git@github.com:LucasSchiavo/my_first_rails_app.git (fetch)
origin git@github.com:LucasSchiavo/my_first_rails_app.git (push)”

“$ ssh -T git@github.com
The authenticity of host ‘github.com (ip)’ can’t be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)?”


#6

You need to type yes for that last command. Can you do that please and post the output.


#7

“$ git remote -v
origin git@github.com:LucasSchiavo/my_first_rails_app.git (fetch)
origin git@github.com:LucasSchiavo/my_first_rails_app.git (push)”

"$ ssh -T git@github.com
The authenticity of host ‘github.com (ip)’ can’t be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ‘github.com,ip’ (RSA) to the list of known hosts.
Enter passphrase for key ‘/c/Users/lucas/.ssh/id_rsa’:
"


#8

If you created a ssh key with no password then you just hit enter at that point.


#9

Thank you

I wrote my password and it returned : “Hi LucasSchiavo! You’ve successfully authenticated, but GitHub does not provide shell access.”


#10

That looks ok to me

Try to push up your work again and let me know if you hit an error.


#11

Thanks

I need to write these commands:

"git remote add origin "
“git push -u origin master”

or not ?


#12

No, you don’t need git remote add origin.

Try

git add .
git commit -m "first commit"
git push origin master

#13

“Another git process seems to be running in this repository, e.g.
an editor opened by ‘git commit’. Please make sure all processes
are terminated then try again. If it still fails, a git process
may have crashed in this repository earlier:
remove the file manually to continue.”

My github account is https://github.com/LucasSchiavo


#14

Close all open terminals, open a new terminal and try again.


#15

The same


#16

Restart your computer?


#17

Yes.


#18

Yes it worked?


#19

Unfortunately, not yet.


#20

What issue are you having now?