【问题标题】:Command Line - GitHub Repo Error: Does not appear to be a git repository命令行 - GitHub 存储库错误:似乎不是 git 存储库
【发布时间】:2020-06-30 01:47:36
【问题描述】:

已暂存并提交本地 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.

也尝试过从现有的 repo 推送:

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

我不明白我做错了什么

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

【问题讨论】:

    标签: git github push remote-repository


    【解决方案1】:

    https:// 之后的域名中似乎有一个奇怪的:。使用git remote set-url origin 'https//github.com/{username}/CodingDojo_Portfolio.git修复。

    【讨论】:

    • hmm true,但这是我从 GitBash 中的错误消息中复制/粘贴的文本
    • 对我如何创建这种响应有什么想法吗?我以为我是信守承诺的,但也许这是我在 GitHub 端(而不是我本地的 git bash 端)没有做的事情
    • 感谢您的关注。我认为这可能是当地问题的结合。我删除了回购并重新开始(再次:))并且在我重新启动计算机并刷新我的互联网连接后,它使用相同的程序工作
    • 在某些时候,你会想要学习修复损坏的 repo 而不是每次开始...
    猜你喜欢
    • 2020-06-10
    • 1970-01-01
    • 2011-11-11
    • 2015-12-30
    • 2015-07-01
    • 2013-03-04
    • 2021-07-28
    • 2017-01-26
    相关资源
    最近更新 更多