fatal:'origin' does not appear to be a git repository fatal:Could not read from remote repository
天gitlab中遇到的问题:
当 git push origin branch_name时遇到报错如下:
fatal:'origin' does not appear to be a git repository
fatal:Could not read from remote repository
原因:
本地分支和远程分支断开连接
解决方法:
cd 本地分支里
1、git branch
——*master 只显示master
然后查看是否从上游拉了
2、git remote –v
——若什么都没有,则和上游已断联系,拉不了代码也推不了代码
加关联
3、git remote add origin ssh://git@gitlab*********************************.git(地址)
然后
4、git fetch origin
——会显示下拉的branch情况
格式为From ssh://gitlab.********************************
* [new branch] XXXXX ->origin/XXXXX
再次检查远程仓库,显示对应的clone地址
git remote –v
——origin git://github.com/schacon/ticgit.git (fetch)
origin git://github.com/schacon/ticgit.git (push)
然后再查分支
git branch –a
——* mater
remotes/origin/XXXXXX **********
具体的切换分支可参考https://blog.csdn.net/tanningzhong/article/details/79724488
git 重命名仓库、修改远程仓库地址、修改仓库配置可参考:https://blog.csdn.net/u011884440/article/details/71246572
---------------------
作者:huanhuaqian
来源:CSDN
原文:https://blog.csdn.net/huanhuaqian/article/details/81986064
版权声明:本文为博主原创文章,转载请附上博文链接!
fatal:'origin' does not appear to be a git repository fatal:Could not read from remote repository的更多相关文章
- 执行git命令时出现fatal: 'origin' does not appear to be a git repository错误
在执行git pull origin master时出现: fatal: 'origin' does not appear to be a git repository fatal: Could no ...
- linux git 报错提示 fatal: 'origin' does not appear to be a git repository 解决办法
输入: git pull origin master git报错提示 fatal: 'origin' does not appear to be a git repository fatal: Cou ...
- 解决“fatal: 'origin' does not appear to be a git repository...”
当使用Git进行代码push提交时,出现报错信息“fatal: 'origin' does not appear to be a git repository...”, $ git push -u o ...
- fatal: 'origin' does not appear to be a git repository
git push时报以下错误: fatal: 'origin' does not appear to be a git repository fatal: Could not read from re ...
- 推送代码分支时出现:fatal: 'origin' does not appear to be a git repository
关于ubuntu进行提交本地分支到远程库出现问题: 解决方案: 执行如下命令: git remote add origin git@github.com:yourusername/test.git y ...
- git pull fatal: refusing to merge unrelated histories
1.首先我github有个远程仓库,然后我本地有个仓库 本地仓库我新添加了一个文件,然后我去关联(git remote add origin git@github.com:qshilary/gitte ...
- Git 提示fatal: remote origin already exists
Git 提示fatal: remote origin already exists 错误解决办法 最后找到解决办法如下: 1.先删除远程 Git 仓库 $ git remote rm origin 2 ...
- remote: Repository not found. fatal: repository 'https://github.com/***/***.git/' not found
通过命令添加新repository到git hub在执行最后一步命令(如下所示)的时候报错 git push -u origin master error:remote: Repository not ...
- 【git基础】Permission denied (publickey). fatal: Could not read from remote repository
运行以下git命令的时候出现错误 git push -u origin master error The authenticity of host 'github.com (13.250.177.22 ...
随机推荐
- Windows安装Python3 curses模块
目录 0.前提 1.pip install wheel 2.下载.whl文件 3.pip install 它 参考 0.前提 确定你已经配置好了Python相关环境,可以正常在命令行使用pip安装. ...
- 性能测试指标:TPS,吞吐量,并发数,响应时间
性能测试指标:TPS,吞吐量,并发数,响应时间 常用的网站性能测试指标有:TPS.吞吐量.并发数.响应时间.性能计数器等. 并发数并发数是指系统同时能处理的请求数量,这个也是反应了系统的负载能力. 响 ...
- 008 webpack的其他使用方式
一:配置 1.配置文件 每次修改main文件,重新打包都要指定入口与出口,比较费事,可以使用配置文件的方式 在根目录下新建webpack.config.js: const path = require ...
- [转]Oracle 查询表外键相关信息
原文地址:https://www.csdn.net/gather_27/MtTaUgxsNzYxMi1ibG9n.html 查找表的外键(包括名称,引用表的表名和对应的键名,下面是分成多步查询): s ...
- Oracle系列一 SQL语句基本概念和学习准备
DML: Data Manipulation Language 数据操纵语言DDL: Data Definition Language 数据定义语言DCL: Data Control Langua ...
- aardio 文档
aardio 文档 根据官方帮助手册制作了一份文档,添加了一些特性. 支持手机阅读 不用电脑也可以学习 aau 了,不受屏幕大小限制,你的小清新还是你的小清新~ 简单的搜索功能 快捷复制示例代码 基于 ...
- [LeetCode] 90. Subsets II 子集合 II
Given a collection of integers that might contain duplicates, nums, return all possible subsets (the ...
- [LeetCode] 96. Unique Binary Search Trees 唯一二叉搜索树
Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For examp ...
- 【SSH进阶之路】Spring的IOC逐层深入——为什么要使用IOC[实例讲解](二)
上篇博客[SSH进阶之路]Spring简介,搭建Spring环境——轻量级容器框架(一),我们简单的介绍了Spring的基本概念,并且搭建了两个版本的Spring开发环境,但是我们剩下了Spring最 ...
- 论consul正确的关闭姿势
最近在工作中发现一个有意思的现象,我用 ctrl+c 关闭本地 consul 的时候,报警系统并没有发出告警,说我的 node 异常,自己看了一下代码,发现 consul 的关闭还是有点猫腻的,仔细来 ...