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 ...
随机推荐
- 20189220 余超《Linux内核原理与分析》第九周作业
理解进程调度时机跟踪分析进程调度与进程切换的过程 本章的基础知识总结 一般来说,进程调度分为三种类型:中断处理过程(包括时钟中断.I/O 中断.系统调用和异常)中,直接调用schedule,或者返回用 ...
- 在python中使用elasticsearch 需要注意的一些问题
1, py es client 使用是 http ,java api 使用是 tcp 2, es.scroll() 方法 在查询多个索引的时候会报 : elasticsearch.exception ...
- Java基础 try...catch...catch 使用Exception,去捕获其子类异常
JDK :OpenJDK-11 OS :CentOS 7.6.1810 IDE :Eclipse 2019‑03 typesetting :Markdown code ...
- 【转载】 LSTM构建步骤以及static_rnn与dynamic_rnn之间的区别
原文地址: https://blog.csdn.net/qq_23981335/article/details/89097757 --------------------- 作者:周卫林 来源:CSD ...
- Python3基础 函数 无return、return 空或None 的效果相同
Python : 3.7.3 OS : Ubuntu 18.04.2 LTS IDE : pycharm-community-2019.1.3 ...
- pipline脚本k8s版
def label = "jnlp-slave" podTemplate(label: label, cloud: 'kubernetes',containers: [ conta ...
- [LeetCode] 66. Plus One 加一
Given a non-empty array of digits representing a non-negative integer, plus one to the integer. The ...
- [LeetCode] 141. Linked List Cycle 链表中的环
Given a linked list, determine if it has a cycle in it. Follow up:Can you solve it without using ext ...
- 扩展Redis的Jedis客户端,哨兵模式读请求走Slave集群
原 扩展Redis的Jedis客户端,哨兵模式读请求走Slave集群 2018年12月06日 14:26:45 温故而知新666 阅读数 897 版权声明:本文为博主原创文章,遵循CC 4.0 b ...
- bat文件注释(jenkins中windows命令行中可以使用)
1.BAT文件中如何注释:1.:: 注释内容(第一个冒号后也可以跟任何一个非字母数字的字符)2.rem 注释内容(不能出现重定向符号和管道符号)3.echo 注释内容(不能出现重定向符号和管道符号)〉 ...