转自   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. MBG(Mybatis Generator)配置

    配置需注意2点, 1.对于匹配所有表用%,多表配合使用_和%,这个和SQL Like查询模糊匹配方法一致 2.配置报错的话,提示如下:标黄的部分其实是正则表达式 The content of elem ...

  2. PHP实现月份自动加1

    <?php date_default_timezone_set('PRC'); $date = date("Y-m-d"); $firstday = date('Y-m-01 ...

  3. Java 实现简单的SQL动态组装工具类

    第一版 package com.zh.oukele.util; import java.util.HashMap; import java.util.Iterator; import java.uti ...

  4. 机器学习mark一下

    https://developers.google.cn/machine-learning/crash-course/ml-intro

  5. C# MVC中直接执行Js

    .NET MVC里如何在服务器端执行JS: 三种解决方案: 1.直接返回JavaScript. public ActionResult XXXAction1() {      return JavaS ...

  6. uname/hostname

    uname 显示操作系统相关信息的命令. hostname 显示或者设置当前系统的主机名 修改hostname

  7. 费马小定理 x

    费马小定理(Fermat Theory) 是数论中的一个重要定理,其内容为: 假如p是质数,且gcd(a,p)=1,那么 a(p-1)≡1(mod p).即:假如a是整数,p是质数,且a,p互质(即两 ...

  8. python写爬虫遇到需要解码js一些记录

    js在线格式化网站 https://beautifier.io/ Python 执行 JS 代码 NodeJS 安装方式 先解决 JS 环境,这里推荐安装 Node.js ,安装方便,执行效率也高. ...

  9. 收藏加备用。ext.xfs文件系统 文件恢复

    注意 当确认误删除文件后立刻使用各种方式阻止新数据在写入该分区了. 设置只读或umount都可以 ext2 3 4 文件系统 可以用 extundelete 这个工具来恢复. github地址: ht ...

  10. 集合家族——stack

    一.概述 在 Java 中 Stack 类表示后进先出(LIFO)的对象堆栈.栈是一种非常常见的数据结构,它采用典型的先进后出的操作方式完成的 它通过五个操作对类 Vector 进行了扩展 ,允许将向 ...