首页 > 解决方案 > 命令行 - GitHub 存储库错误:似乎不是 git 存储库

问题描述

已暂存并提交本地 repo 并创建了远程 repo。检查它是否确实存在 ( git remote -v) 并且它似乎在那里。

当我尝试使用 - git push -u origin master- 推送它时,我收到以下错误消息:

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

还尝试从现有的回购中推送:

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

我不明白我做错了什么

(我之前遇到过类似的错误,我删除了远程仓库并在没有 README.md 的情况下重新创建了它,并且有效,但这次不行)

标签: gitgithubpushremote-repository

解决方案


看起来:域名后面有一个奇怪的https://。用来git remote set-url origin 'https//github.com/{username}/CodingDojo_Portfolio.git修复。


推荐阅读