GitHub提交项目到仓库fatal: No configured push destination.

原因:没指定提交到哪个远程仓库

解决方法:

在你git add .和commit之后

bash 复制代码
git add .
git commit -m "信息"

git push前输入以命令

bash 复制代码
git branch -M main
git remote add origin git@github.com:xxx(你GitHub的名称)/xxx.git(你仓库的名称)
git push -u origin main

参考:

关于gitee第一次提交出现fatal: No configured push destination. Either specify the URL from the command-line or_either specify the url from the command-line or co-CSDN博客

如何新建Github仓库并将本地文件上传到Github(远程连接)以及Git常用命令总结_github 新建仓库push-CSDN博客

相关推荐
小弥儿1 小时前
GitHub今日热榜 | 2026-07-04
学习·开源·github
CoderJia程序员甲2 小时前
GitHub 热榜项目 - 周榜(2026-07-04)
ai·大模型·llm·github
REDcker2 小时前
GitHub SSH 连接失败排障实录
运维·ssh·github
菜鸟是大神3 小时前
【Hermes入门11讲】第七讲:定时自动化——让Hermes成为你的24小时助手
人工智能·github·hermes
newbe365245 小时前
我们如何使用 impeccable 优化前端界面设计与实现稳定性
前端·人工智能·分布式·github·aigc·wpf
一次旅行11 小时前
AI 前沿日报 | 2026年7月3日 星期五
人工智能·github·ai编程
青山木16 小时前
快速搭建免费的个人博客网站:Hexo + GitHub Pages + Butterfly 完整指南
git·github
阿里嘎多学长19 小时前
2026-07-03 GitHub 热点项目精选
开发语言·程序员·github·代码托管
江畔柳前堤20 小时前
第11章:Docker 安全加固
运维·git·安全·docker·容器·eureka·github
owCode1 天前
Windows RX6500XT(gfx1034) Ollama AMD ROCm 完整安装教程
语言模型·chatgpt·github·llama·gpu算力