SSH local to github confusion


I’m a total beginner trying my first local to Github. I’ve properly set up my SSH to work with Github. I can do a

ssh -T

and get the success message. However, when I try to initially move my local files to my new Github repo,

git remote add origin
git push -u origin master

I get

fatal: '' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

I try the standard

git remote add origin

it seems to work but asks me for username/password, which then won’t take my regular password, but wants a token. Obviously, I’m missing something here on using the no id/pass SSH way. I’m on Ubuntu and working from a command line, BTW.


The syntax for a URL / URI (with some simplifications) is:




The scheme part here is one of http, https, ssh, and so on. So you can simply write:


instead of:


(you must use the user name git with the ssh scheme because of the way GitHub handles incoming ssh requests).

If you choose to use Git’s own shorthand notation:

note that there is a colon (:) after the part. It must not be eliminated.

Answered By – torek

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published