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博客

相关推荐
@呱呱爱学习3 小时前
2026年09月28日 | 呱呱AI日报】GitHub 发布 Copilot WSL 教程,介绍在 Ubuntu 中运行编程 Agent
人工智能·github·copilot
阿里嘎多学长6 小时前
2026-09-28 GitHub 热点项目精选
开发语言·程序员·github·代码托管
程序员清风6 小时前
vLLM 实战:用 OpenAI 兼容接口部署本地大模型推理服务
开源·github·vllm
七牛云行业应用9 小时前
Jev 报 401 / api_key_required 怎么解决:TypeSafe AI 官方错误码表与排查步骤
算法·github
誰能久伴不乏10 小时前
保姆级 GitHub 协作教程
github
miofly15 小时前
Claude 自主发现类 CRISPR 结构的新型逆转录酶系统:Anthropic 生命科学实验室的早期成果
开源·github
HelloGitHub17 小时前
《HelloGitHub》第 126 期
开源·github
miofly18 小时前
GitHub 日榜趋势速报 | 2026-09-28
开源·github
miofly1 天前
GitHub 日榜趋势速报 | 2026-09-27
开源·github
怕浪猫1 天前
顶级模型一句话,AI 写出了能玩的 QQ飞车
前端·面试·github