git - 命令行 - 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 的情况下重新创建了它,并且有效,但这次不行)
解决方案
看起来:
域名后面有一个奇怪的https://
。用来git remote set-url origin 'https//github.com/{username}/CodingDojo_Portfolio.git
修复。
推荐阅读
- excel - 使用宏用时间戳填充列
- vue.js - vuejs 递归单文件组件
- android - 为什么我在 Android Studio 中收到“未解析的引用:绑定”错误?
- c# - WPF QuickConverter:布尔值且不起作用
- javascript - Puppeteer 无法发布
- java - 如何将一棵树转换为另一棵树?
- sql-server - 使用 Lead/Lag 对 SQL 查询中的相关记录进行分组
- cad - 如何使用 OpenCascade 在 3d 中可视化 .stp 文件?
- redis - 在 Redis 中选举新的 master 之前数据会发生什么?
- java - 索引越界Java合并排序?