fatal: Could not read from remote repository.的解决办法
原文地址:http://blog.csdn.net/huahua78/article/details/52330792
---------------------------------------------------------------------------------
-
查看远端地址
git remote –v
查看配置git config --list
git status
git add . // 暂存所有的更改git checkout . // 丢弃所有的更改git status // 查看文件状态git commit -m "本次要提交的概要信息" // 提交
- 1
- 2
- 3
- 4
设置远端仓库地址
git remote set-url origin 你的远端地址
git push origin master出现以下情况:解决办法:删除当前key,然后重新生成key,
会在本地C:\Users\你的用户名.ssh生成文件夹,里面有id_rsa和id_rsa.pub两个文件
然后复制id_rsa.pub文件里面的内容,到https://github.com/settings/keys新建一个,
设置远程地址:(上面新建的)
git remote add origin_new 新的地址
git remote –v查看
git push origin_new master重新推送
下面是设置用户名
Git config –global user.name “用户名”
git config –global user.email 邮箱地址设置代理:
git config –global https.proxy http://127.0.0.1:1080
取消设置代理:
git config –global –unset https.proxy取消git init操作时出现 rm: cannot remove ‘.git’: Is a directory
是因为输入的命令是: rm -f .git
解决办法:rm -rf .git 即删除整个.git目录failed to push some refs to ‘git@github.com:*.git’ hint: Updates were rejected ···
使用git push origin master的时候出现一下错误:解决办法:
git push -f origin master或者git pull下恢复不小心删除的 git stash 文件:
git fsck //找到dangling的对象 git show id //上面列出的每一条记录的最后一个字符串,按 enter 查看具体信息 git stash apply id
- 1
- 2
- 3
git 回滚提交
//reset将一个分支的末端指向另一个提交。这可以用来移除当前分支的一些提交, 让master分支向后回退了两个提交 git checkout master git reset HEAD~2//Revert撤销一个提交的同时会创建一个新的提交, 找出倒数第二个提交,然后创建一个新的提交来撤销这些更改,然后把这个提交加入项目中。 git revert HEAD~2
- 1
- 2
- 3
- 4
- 5
- 6
错误:Please enter a commit message to explain why this merge is necessary. 解决办法:
1. (可选)按键盘字母 i 进入insert模式
2. (可选)修改最上面那行黄色合并信息
3. 按键盘左上角”Esc” (退出insert模式)
4. 输入”:wq”,按回车键即可(提交)
版权声明:本文为博主原创文章,未经
fatal: Could not read from remote repository.的解决办法相关推荐
- fatal: Could not read from remote repository.的解决办法 . (git项目上传报错)
查看远端地址 git remote –v 查看配置 git config --list git status git add . // 暂存所有的更改git checkout . // 丢弃所有的更 ...
- Permission denied (publickey). fatal: Could not read from remote repository.
博主在github上下载tiny face的的源代码的时候,遇到git clone命令为:git clone --recursive git@github.com:peiyunh/tiny.git 而 ...
- 解决git@github.com: Permission denied (publickey). fatal: Could not read from remote repository. Pleas
今天用idea提交代码到github上,push后报错 git@github.com: Permission denied (publickey). fatal: Could not read fro ...
- git@github.com:Permission denied(publickey).fatal: Could not read form remote repository错误
文章目录 前言 问题分析 解决方法 配置客户端 配置服务端 验证 前言 在使用goland从github下载依赖时(git clone github.com/gin-gonic/gin)出现git@g ...
- git clone报错:Permission denied (publickey). fatal: Could not read from remote repository...
原文:git clone报错:Permission denied (publickey). fatal: Could not read from remote repository- 今天clone一 ...
- fatal: ‘origin‘ does not appear to be a git repository fatal: Could not read from remote repository.
fatal: 'origin' does not appear to be a git repository fatal: Could not read from remote repository. ...
- git解决 “fatal: Could not read from remote repository.“
问题描述: 在使用Git将本地仓库推送到远程仓库的时候,发生了如下错误:"fatal: Could not read from remote repository." 问题原因: ...
- fatal: unable to access 或者 fatal: could not read from remote repository
今天发现一个很有意思的问题,使用git bash here 去拉取代码的时候,用clone with ssh或者是clone with http的链接都不好使,均报错,百思不得其解啊,为此还花了点时间 ...
- Git push错误,Unauthorized fatal: Could not read from remote repository.未验证不能提交
错误 git push -u origin master Unauthorized fatal: Could not read from remote repository. (Bitbucket - ...
最新文章
- 2021年大数据Spark(五十):Structured Streaming 案例一实时数据ETL架构
- extmail电子邮件系统
- MapStruct在Eclipse中的使用
- 鸿蒙兼容安卓app 为什么还要生态,就因为鸿蒙兼容安卓APP,中兴就宣布弃用?...
- Vue.js 模板语法
- boost::mp11::mp_partition相关用法的测试程序
- 《西游记》原著的一点读后感
- 关于“三门问题”的一些想法
- 关于代码效率提升的方法心路历程(购物车)
- SQL Server群集共享存储迁移
- 吴恩达对话LeCun:神经网络跌宕四十年
- 剑指offer面试题[64]-数据流中的中位数
- 难得一见的DIY针孔相机
- html css开关按钮样式,纯CSS实现开关按钮
- Excel连接MySQL数据库进行数据的可视化
- 华为推送-华为PUSH SDK Android版接入方法
- 安装Ubuntu后找不到windows启动项的解决办法
- Android课题研究的主要观点,课题研究的主要内容
- 2013上半年 系统集成项目管理工程师 下午试卷
- LeetCode:838. 推多米诺————中等
热门文章
- linux 权限测试,linux下检测root权限的shell脚本
- u盘分为windows和linux启动,【电脑软件】Ventoy 官方版,一个U盘,同时拥有启动win+linux+Ubuntu...
- Oracle数据库 invalid character问题解决
- PyTorch C++ API libtorch 简介
- Weblogic12c T3 协议安全漏洞分析【CVE-2020-14645 CVE-2020-2883 CVE-2020-14645】
- mysql新增阵列df_DF学Mysql(三)——索引操作
- 希望得到学术会议的及时回复该怎么说_张烨:在“选矿”博士的世界里,脚踏实地从来都不是说说而已!| 中南达人NO.188...
- Kingback小组冲刺博客
- 类似索引Model套Model之 iOS模型闲聊二
- 在C#中创建DataTable