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 小时前
我用百度地图 Skills 体系重构了物流调度系统,节省了 90% 的人力
前端·github
Hommy887 小时前
【剪映小助手】贴纸搜索接口
开源·github·aigc·剪映小助手·视频剪辑自动化
vortex57 小时前
GitHub 开源信息搜索指南:Web 语法与 CLI 工具
开源·github
vortex59 小时前
Kali Linux 安装与使用 GitHub CLI (gh)教程
linux·运维·github
qcx239 小时前
【AI Daily】AI日报 | 2026-05-24
ai·llm·github·论文·agent
阿里嘎多学长10 小时前
2026-05-24 GitHub 热点项目精选
开发语言·程序员·github·代码托管
CoderJia程序员甲10 小时前
GitHub 热榜项目 - 周榜(2026-05-24)
ai·llm·github·ai教程
星栈独行10 小时前
别让 API 跳去登录页:我在 Axum 里做了认证失败双通道
前端·后端·rust·开源·github·个人开发
ShyanZh11 小时前
【Claude实战】使用 GitHub CLI (gh) 汇总 GitHub 仓库
ai·github·claude
難釋懷11 小时前
Nginx基于反向代理的负载均衡
nginx·github·负载均衡