简体   繁体   中英

Command Line - GitHub Repo Error: Does not appear to be a git repository

Have staged and committed local repo and created remote repo. Checked to see that it does exist ( git remote -v ) and it appears to be there.

When I try to push to it with - git push -u origin master - I get the following error message:

'https//:github.com/{username}/CodingDojo_Portfolio.git' does not appear to be a git repository
fatal: Could not read from remote repository.

Have also tried to push as from an existing repo with this:

git remote add origin https://github.com/{username}/CodingDojo_Porfolio.git
git push -u origin master

I don't understand what I am doing incorrectly

(I encountered a similar error previously and I deleted the remote repo and recreated it with out the README.md and that worked, but not this time)

Looks like there is a weird : in the domain name right after the https:// . Use git remote set-url origin 'https//github.com/{username}/CodingDojo_Portfolio.git to fix.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM