Closed soniavsd closed 4 years ago
@soniavsd can you please post exactly what you're typing into the terminal that results in this error?
@ShawnTylerSchwartz sure, i typed this: git init git add -A git commit -m "forgotwhatiputhere" git remote add origin https://github.com/soniavsd/eeb-c177-project.git git push -u origin master
@soniavsd what happens if you try git push origin master without the -u?
@ShawnTylerSchwartz it states: fatal: could not read from remote repository Please make sure you have the correct access rights and the repository exists.
It also states that the remote origin already exists after I do the remote add origin
@soniavsd what happens if you run the command git remote -v
?
@ShawnTylerSchwartz i got: origin git@github.com:soniavsd/eeb-c177-project (fetch) origin git@github.com:soniavsd/eeb-c177-project (push)
...i dont know what this means...
@soniavsd hmm that’s strange because that looks fine to me. Can you instead just create the repository on GitHub and clone it like we did in the very beginning of the course (to work around these issues now)?
@ShawnTylerSchwartz I tried to clone it after we talked and it didn't work. I did some more google research and typed in my new error line and got this: A "Permission denied" error means that the server rejected your connection. There could be several reasons why, and the most common examples are explained below.
And my push finally worked after I changed the remote url in the terminal! Still a bit confused of what was wrong with it initially...but as long as it works! Thank you for the help!
@soniavsd okay great! Glad you were able to troubleshoot and solve it!
I am trying to create a new repository and followed all the steps on GitHub, but whenever I enter git push -u origin master, i get: git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.