转自   https://blog.csdn.net/u010042585/article/details/79378726

将本地项目push到GitHub时遇到的问题

、$ git remote add origin时出现fatal: remote origin already exists.错误
只要执行一下git remote rm origin 在执行git remote add origin 就可以啦 、执行git push -u origin master(使用的时HTTPS连接,没有验证SSH连接)时出现remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com问题解决办法:
在输入Username for 'https://github.com': XXX 后弹出的窗口需要输入密码,这个密码不是GitHub登录密码而是gitab 的访问令牌 、$ git push -u origin master
fatal: HttpRequestException encountered. Username for 'https://github.com':
To https://github.com/
! [rejected] master -> master (fetch first)
error: failed to push some refs to
错误解决办法
执行一下:git pull --rebase origin master 、 [root@node2 learngit]# git push origin master
To http://192.168.0.74:9675/zihao/test.git
! [rejected] master -> master (fetch first)
error: failed to push some refs to 'http://192.168.0.74:9675/zihao/test.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first merge the remote changes (e.g.,
hint: 'git pull') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details. 解决: 先pul 再push [root@node2 learngit]#git pull http://192.168.0.74:9675/zihao/test.git
[root@node2 learngit]# git push origin master

git_push报错的更多相关文章

  1. Windows 7上执行Cake 报错原因是Powershell 版本问题

    在Windows 7 SP1 电脑上执行Cake的的例子 http://cakebuild.net/docs/tutorials/getting-started ,运行./Build.ps1 报下面的 ...

  2. 关于VS2015 ASP.NET MVC添加控制器的时候报错

    调试环境:VS2015 数据库Mysql  WIN10 在调试过程中出现类似下两图的同学们,注意啦. 其实也是在学习的过程中遇到这个问题的,找了很多资料都没有正面的解决添加控制器的时候报错的问题,还是 ...

  3. php报错 ----> Call to undefined function imagecreatetruecolor()

    刚才在写验证码的时候,发现报错,然后排查分析了一下,原来是所用的php版本(PHP/5.3.13)没有开启此扩展功能. 进入php.ini 找到extension=php_gd2.dll ,将其前面的 ...

  4. scp报错 -bash: scp: command not found

    环境:RHEL6.5 使用scp命令报错: [root@oradb23 media]# scp /etc/hosts oradb24:/etc/ -bash: scp: command not fou ...

  5. VS2015使用scanf报错的解决方案

    1.在程序最前面加: #define _CRT_SECURE_NO_DEPRECATE 2.在程序最前面加: #pragma warning(disable:4996) 3.把scanf改为scanf ...

  6. VS项目中使用Nuget还原包后编译生产还一直报错?

    Nuget官网下载Nuget项目包的命令地址:https://www.nuget.org/packages 今天就遇到一个比较奇葩的问题,折腾了很久终于搞定了: 问题是这样的:我的解决方案原本是好好的 ...

  7. Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误——SHH框架

    SHH框架工程,Tomcat启动报错org.springframework.web.context.ContextLoaderListener类配置错误 1.查看配置文件web.xml中是否配置.or ...

  8. Android——eclipse下运行android项目报错 Conversion to Dalvik format failed with error 1解决

    在eclipse中导入android项目,项目正常没有任何错误,但是运行时候会报错,(clean什么的都没用了.....)如图: 百度大神大多说是jdk的问题,解决: 右键项目-Properties如 ...

  9. 报错:You need to use a Theme.AppCompat theme (or descendant) with this activity.

    学习 Activity 生命周期时希望通过 Dialog 主题测试 onPause() 和 onStop() 的区别,点击按钮跳转 Activity 时报错: E/AndroidRuntime: FA ...

随机推荐

  1. 系统---《windows + ubuntu双系统》

    安装 Windows + Ubuntu双系统 不是第一次安装 Windows + Ubuntu双系统了,每一遇见的问题都不一样,收获也不一样. 制作U盘的部分截图: 电脑的基本配置截图:

  2. linux实操_进程管理

    1.显示系统执行的进程 说明:查看进程使用的的指令时 ps ,一般来说使用的参数时ps -aux ps -a:显示当前终端的所有进程信息 ps -u:以用户的格式显示进程星系 ps -x:显示后台进程 ...

  3. Python+request 获取响应(elapsed)和响应时间(timeout)《七》

    requests发请求时,接口的响应时间,也是我们需要关注的一个点,如果响应时间太长,也是不合理的.如果服务端没及时响应,也不能一直等着,可以设置一个timeout超时的时间 具体的实现如下: 超时( ...

  4. springboot2.0入门(九)-- springboot使用mybatis-generator自动代码生成

    一.配置文件引入 插件引入,引入 <plugin> <groupId>org.mybatis.generator</groupId> <artifactId& ...

  5. 使用docker配置gitlab服务器

    下载gitlab镜像,导入 [root@gitlab ~]# docker load < gitlab_zh.tar 容器需要22端口,所以修改ssh的默认端口 [root@gitlab ~]# ...

  6. 【基础算法-ST表】入门 -C++

    前言 学了树状数组看到ST表模板跃跃欲试的时候发现完全没思路,因为给出的查询的时间实在太短了!几乎是需要完成O(1)查询.所以ST表到底是什么神仙算法能够做到这么快的查询? ST表 ST表是一个用来解 ...

  7. phpweb文件上传下载

    PHP用超级全局变量数组$_FILES来记录文件上传相关信息的. 1.file_uploads=on/off 是否允许通过http方式上传文件 2.max_execution_time=30 允许脚本 ...

  8. ECMAScript 提案阶段

    stage0 strawman任何讨论.想法.改变或者还没加到提案的特性都在这个阶段.只有TC39成员可以提交. stage1 proposal (1)产出一个正式的提案. (2)发现潜在的问题,例如 ...

  9. 第一章:Python数据分析前的基础铺垫

    本节概要 - 数据类型 - 数据结构 - 数据的常用操作方法 数据类型 基础铺垫 定义 我们搞数据时,首先要告诉Python我们的数据类型是什么 数值型:直接写一个数字即可 逻辑型:True,Fals ...

  10. 调试NTDLL加载

    1 随便切到一个进程 0: kd> !process 0 0 explorer.exePROCESS 8157e9a8 SessionId: 0 Cid: 06a4 Peb: 7ffde000 ...